No true darkness?

I’ve jacked the ambient light all the way down to: ambientlight[4]={0,0,0,1}; and I only have a single lightsource.

But for some reason, the dark side of an object (say, a planet) is still, albiet barely, distinguishable. Although under many curcumstances it would appear to be totally black, if I have my brightness turned way up, I can see that it is definately not totally devoid of illumination. How can I ensure that the back side of a planet or whatever is TOTALLY un-illuminated if there’s NO light on it? Thanks!

check the global ambient value…

glLightModel(if}(GL_LIGHT_MODEL_AMBIENT
,0.2, 0.2, 0.2, 1.0)

is the default you need

glLightModel(if}(GL_LIGHT_MODEL_AMBIENT
,0.0, 0.0, 0.0, 1.0)

hth
the notorious mr x

better yet… if all or your vertices are of the color 0,0,0,1 (if you are just using materials then issue a glColor4f(0,0,0,1) on startup (or you can just do this for all the vertices)
then just issue glDisable(GL_LIGHTING);

Thanks for the tip, but I don’t quite understand the second tip… If I disable GL_LIGHTING, won’t I also lose the lightsources I DO want? Thanks again!

Yep, you need to set the ambient light level, since you need the lightsources.

helps not to post when you are not awake… the first tip is correct

Okay, thanks! I appreciate it!