Hi! I have disabled all my light sources, but the objects that I render don’t become completely black. First when I have one light source enabled, and set the ambient light to be negative (-0.2 in the r, g and b components) I get a completely black scene. What is that light that won’t disappear, even when I have no light sources at all, and how can I get rid of it?
Daft question, but are you clearing the screen with a colour that is not black?
Probably you did not set the global ambient light to 0 (default is 0.2) :
http://www.opengl.org/sdk/docs/man/xhtml/glLightModel.xml
Thanks, the following code solved it
//Elimitate global ambient light
GLfloat black[] = {0, 0, 0, 1};
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, black);