• Advertisement

Archived

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

texture mapping/lightinh problem

This topic is 5110 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
im using the glEnable(GL_COLOR_MATERIAL);

but when i use glEnable(GL_TEXTURE_2D);

it seems to make everything the same colour a the texture i loaded

Share this post


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