Simple lighting :(
Ive got some cubes on the screen, apparently green.
However, when the light is enabled, no matter how low the intensity or botht he light and ambient light, the cubes become grey-scale.
Is there any specific reason why this is happening? Im still setting the colour. The only difference is that the one white light is enabled...
Thanx
Have you correctly set up the light ?
Please post some code.
========================
Leyder Dylan (dylan.leyder@slug-production.be.tf
http://users.skynet.be/fa550206/Slug-Production/Index.htm/
Please post some code.
========================
Leyder Dylan (dylan.leyder@slug-production.be.tf
http://users.skynet.be/fa550206/Slug-Production/Index.htm/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
Wehn you enable lighting, you need to enable GL_COLOR_MATERIAL, and use glColorMaterial in combination with glColor to set the material properties of the object. Or alternatively, you can just use glMaterial to set the material properties of the object. The default material properties would give you a greyscale object rather than a color object.
J.W.
J.W.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement