OpenGL
is a standard specification that provides cross-platform API
to draw 2D and 3D graphics images. GLEventListener
and GLAutoDrawable
interface is present in javax.media.opengl
package. GLEventListener
interface is used to provide the graphical functionality to Java program. GLAutoDrawable drawable
, boolean modeChanged
, boolean deviceChanged
)GLAutoDrawable
drawable, int x, int y, int width, int height
)GLAutoDrawable
interface provides an event-based mechanism to generate an image. GLCapabilities
class is used to define the capabilities of OpenGL such as OpenGL profile, color depth, etc. JOGL
primitives are inbuilt parameters used to draw two-dimensional and three-dimensional graphics objects. display()
method used to draw and display graphics objects. Thus, it contains the primitive parameters with the methods containing the dimensions and all other attributes used to provide the special effect to an image such as coloring, scaling, rotating, etc. JOGL
, an image can be diminished by using glScalef()
method of GLMATRIXFUNC
interface. FPSAnimator
class. It is used to rotate an object at the rate of frame per second.