Simple lighting :(

Started by
2 comments, last by jubbbird 20 years, 6 months ago
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
Advertisement
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/
========================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.
Cheers guys for ur replies, ive had it on hold for a few days, butill soon be back onthe job, so ill try out what uve said, and post again later


Cheers again

This topic is closed to new replies.

Advertisement