Installation steps for openGL on ubuntu


 GLUT

it is openGL_Utility_Toolkit

for openGL programming we need to install glut (pronounce as glat). Following are the steps to install GLUT on Ubuntu operating system.


Step 1: sudo apt-get update 
             For updation of basic packages


Step 2: sudo apt-get install build-essential
              For installing essential packages.


Step 3: sudo apt-get install freeglut3 freeglut3-dev
              //its GL utility toolkit

Step 4: sudo apt-get install binutils-gold 
           It is GNU gold linker utility.  Gold is a new linker, which is faster than the current linker included in binutils

Step 5: sudo apt-get install g++ cmake
        its a  Command-Line Reference.Users build a project by using CMake to generate a build system for a native tool on their platform.

Step 6: sudo apt-get install mesa-common-dev mesa-utils
    These are packages 

Step 7: sudo apt-get install libglew-dev libglew1.5-dev libglm-dev
      These are packages 

Step 8: glxinfo | grep OpenGL
     used to search a particular word or file

Now you are ready to compile your program!

● Write your program using any editor and save.
● Open the terminal for the specified folder and then compile the program with:

gcc MyProg.c -lGL -lGLU -lglut (for C program)
     (-l is to link libraries )

g++ MyProg.cpp -lGL -lGLU -lglut (for C++ program)

Above instruction will create a.out file in your specified folder and to execute this file use our basic command
               ./a.out 


Guys share your comments and suggestions to make this platform more user friendly and to make Computer Graphics easy and enjoyable for  learners.

 

Comments

Popular posts from this blog

Second Assignment DDA algorithm for line drawing using Mouse