colors and texture filtering
howdy I am at lesson six of the tutorials and I left the two objects in the program from lesson five. So i have two 3d objects that have color blending in them and the third object has the NeHe textured BMP on it. When I run the program I discovered that the "glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);" statement removes all of the red colors from the two color blended objects. If I comment out both filters the textured object appears white. What do I need to do to show all three objects properly?
You don''t want to comment out the filters. If I understood it correctly you were trying to draw two objects without a texture, and one with a texture. But you would want to disable texture mapping when drawing the objects without textures, using
glDisable(GL_TEXTURE_2D);
And enabling it again when drawing the object with a texture.
glEnable(GL_TEXTURE_2D);
And if you didn''t want the texture mapped object to appear blended, then disable blending, and enable it afterwards, just like with the texture mapping.
Hope this helps!
glDisable(GL_TEXTURE_2D);
And enabling it again when drawing the object with a texture.
glEnable(GL_TEXTURE_2D);
And if you didn''t want the texture mapped object to appear blended, then disable blending, and enable it afterwards, just like with the texture mapping.
Hope this helps!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement