texture mapping/lightinh problem
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?
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
but when i use glEnable(GL_TEXTURE_2D);
it seems to make everything the same colour a the texture i loaded
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
Enigma
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement