OpenGL Texture Problem...
I have a class CTextureManager that handles all of my texture loading, unloading, etc. Here''s the problem, when I call CTextureManager::LoadBitmapTexture(...) and map the texture onto a primitive, it only uses the LAST texture I loaded for all of the objects in the scene. I only call glGenTextures once, in the constructor. Any help would be appreciated. My system is a Pentium III 800mhz, 512 RAM, Nvidia GeForce2 MX 400. Thanks in advance.
You need to save the Texture IDs from the textures and then Bind them as you go along with glBindTexture().
ex. glBindTexture(GL_TEXTURE_2D, texID);
At the beggining
Load 3 textures.
Your main loop should then be something like this
BInd Tex 1
Draw the grass
Bind Tex 2
Draw the Dirt
Bind Tex 3
Draw the water
--------------------------
Those who dance are considered insane by those who cannot hear the music.
Edited by - terminate on January 8, 2002 11:28:49 AM
ex. glBindTexture(GL_TEXTURE_2D, texID);
At the beggining
Load 3 textures.
Your main loop should then be something like this
BInd Tex 1
Draw the grass
Bind Tex 2
Draw the Dirt
Bind Tex 3
Draw the water
--------------------------
Those who dance are considered insane by those who cannot hear the music.
Edited by - terminate on January 8, 2002 11:28:49 AM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement