Advertisement

How to create more than one texture ?

Started by April 18, 2000 02:57 AM
1 comment, last by Androme 24 years, 7 months ago
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 ?
Sorry for the post , i just found how to do.
Advertisement
ive just started opengl too and if anyone is interested about how to load different textures i added to nehe''s tutorial on texture mapping. its beased on nehe''s code so anyone following his tutorials shouldnt be lost. the source is at http://madmax22e.hypermart.net/

This topic is closed to new replies.

Advertisement