Graphics Assignment No: 1 Solution

$30.00

Category:

Description

  • Assignment Description

 

Install OpenGL and its components in Ubuntu and compile programs for simple primitives (line, square, polygon and circle).

 

  • Procedure

 

Installation

 

Install the following packages from the Ubuntu repository:

 

freeglut3-dev

 

mesa-common-dev

 

 

sudo apt-get install freeglut3 freeglut3-dev mesa-common-dev

 

Check your =usr=include=GL folder to verify the installation of the OpenGL headers that you intend to use.

 

Compiling and Linking

 

We will have to use the lglut linker option with gcc=g++ to compile a program with glut library.

 

For example, to compile the program, use the following to get the binary executable code:

 

 

g++ primitive.cpp -lGL -lGLU -lglut -o primitive

 

 

 

 

 

 

 

 

 

 

1

 

 

 


error: Content is protected !!