Using JOGL, you can provide various light effects to any type of object through coding. This effects makes the object visually better.
Following are some of the important light sources: -
JOGL Important Methods
These are some of the important methods used to provide light to an object: -
JOGL Lighting Example
In this example, we will rotate a triangle as we have done earlier. With each rotation you will notice that the color of triangle will also be changed.