Jump to content
  • Advertisement

Archived

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

kroppy flop

colors and texture filtering

This topic is 5674 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

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?

Share this post


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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!