How to create more than one texture ?
hi ! i''m new in opengl coding so be cool please ....
How can i create more than on texture ?
to create one texture i use this :
if (TextureImage[0]=LoadBMP("Data/france.bmp"))
{
Status=TRUE; // Set The Status To TRUE
glGenTextures(1, &texture[0]);// Create The Texture
// Typical Texture Generation Using Data From The Bitmap
glBindTexture(GL_TEXTURE_2D, texture[0]);
glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
}
what can i do to create a second different texture ?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement