• Advertisement

Archived

This topic is now archived and is closed to further replies.

How to create more than one texture ?

This topic is 6517 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 ?

Share this post


Link to post
Share on other sites
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/

Share this post


Link to post
Share on other sites

  • Advertisement