public void setAmbientLight ( int i , Color color , boolean enableColor ) { float ambient [ ] = { ( float ) color . getRed ( ) , ( float ) color . getGreen ( ) , ( float ) color . getBlue ( ) , ( float ) color . getAlpha ( ) } ; gl . glEnable ( GL2 . GL_LIGHTING ) ; gl . glEnable ( GL2 . GL_LIGHT0 + i ) ; if ( enableColor ) gl . glLightfv ( GL2 . GL_LIGHT0 + i , GL2 . GL_AMBIENT , ambient , 0 ) ; }
Sets the color value of the No . i ambientLight