views:

23

answers:

1

I'm new to OpenGL/JOGL. I'm experimenting with lighting:

    gl.glEnable(GL2.GL_LIGHT1);
    gl.glEnable(GL2.GL_LIGHTING);

When I disable the first line, all the objects in my scene get somewhat dark, but they still have some light. Where else could that light be coming from? (This is the only light source I have.) Is there some default ambient light that I can turn off?

+4  A: 

Yep, there are glMaterial(GL_AMBIENT, ...) and glLightModel(GL_LIGHT_MODEL_AMBIENT, ...) which are both set by default to (0.2, 0.2, 0.2, 1.0);

ybungalobill
http://www.falloutsoftware.com/tutorials/gl/gl8.htm explains things pretty well.
ybungalobill