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 co开发者_如何学Culd that light be coming from? (This is the only light source I have.) Is there some default ambient light that I can turn off?
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);
精彩评论