Jump to content
  • Advertisement

Archived

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

OnANeedToKnow

texture mapping/lightinh problem

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

i have objects that a just coloured using glColor3f() and i have lighting which makes it look kool, but when i add a texture to an object i seem to lose the colours. any1 no why?

Share this post


Link to post
Share on other sites
Advertisement
If you mean you apply a texture to one object and objects that shouldn''t be textured change to the colour of the texture then the solution is to disable texturing before drawing untextured objects. Remember that OpenGL is state machine. When you enable texturing it remains enabled until you disable it. When you specify a texture coordinate it applies to every vertex until you change it.

Enigma

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!