set opengl Lighting - Java javax.media.opengl

Java examples for javax.media.opengl:Light

Description

set opengl Lighting

Demo Code


import javax.media.opengl.GL;
import javax.media.opengl.GL2;

public class Main{
    public static boolean setLighting(GL2 gl, boolean lighting) {
        if (lighting)
            gl.glEnable(GL2.GL_LIGHTING);
        else//  ww w.java 2s. com
            gl.glDisable(GL2.GL_LIGHTING);
        return lighting;
    }
}

Related Tutorials