In JOGL, Scaling is used to either increase or decrease the size of an object. It manipulates the physical dimensions of an object. Thus, through scaling an object can be stretched or shrink from any of its axis.
To scale an object the following syntax is used:
Here, glScalef() method is provided by GLMatrixFunc interface with the parameters that represents the dimensions.
JOGL Scaling Example
In this example, we will diminished the dimensions of polygon.