Hi all,
How to get lighting effect with the colors that I used to draw the objects. That is I have a cube with diferent colors for each surface. But When I use lighting effect. I get all in white-black-grey combination. I used white light( {1.0,1.0,1.0,1.0}). I tried some of the examples from the net. But didn’t help. Can anybody help me. So that I get the surfaces lit with its own colors.

Hi !

Maybe you could post the part of your code that does the rendering here, it is difficult to say whats wrong without having a peek at the code.


When you apply lighting, the colored vertices will disappear. Don’t know why, but they do. In order to get them back, you either have to create a texture, or use materials. Setting the material values is usually easier. XD

did you try to search about this here?
use this:
if u use glColor3f to color vertices
or use materials…

[This message has been edited by gvm (edited 02-27-2004).]