开发者

OpenGL: Turn off all lighting except what I specify?

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);

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜