JOGL Drawing with GL Lines - JOGL

What is JOGL Drawing with GL Lines?

In the Earlier sections we have learned how draw a basic line by means of JOGL. We draw lines by passing a predefined field, Gl_lines to glBegin() method.

This section offers instances to draw shapes like triangle, rhombus and a house, using glBegin() method and GL_Lines.
Let us go through a program to draw a triangle using GL_LINES –

If you compile and execute the above program, the resulting output is created. It shows a triangle drawn using GL_LINES of glBegin() method.

triangle (1)

Let us go through a program to draw a rhombus using GL_LINES –

If you compile and execute the above program, you get the resulting output. It shows a rhombus generated using GL_LINES of glBegin() method.
rhombus

Let us go through a program to draw a house using GL_LINES –

If you compile and execute the above program, you get the resulting output. It shows a house diagram generated using GL_LINES() method.

house

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

JOGL Topics