Prerequisite : Internet Connection
To install OpenGL on system you need to install some basic packages. Open terminal and execute the following commands on terminal.
Step 1: sudo apt-get update
To update your basic packages
Step 2: sudo apt-get install build-essential
For installing essential packages.
Step 3: sudo apt-get install freeglut3 freeglut3-dev
Step 4: sudo apt-get install binutils-gold
Step 5: sudo apt-get install g++ cmake
Step 6: sudo apt-get install mesa-common-dev mesa-utils
Step 7: sudo apt-get install libglew-dev libglew1.5-dev libglm-dev
Step 8: glxinfo | grep OpenGL
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 run with:
gcc MyProg.c -lGL -lGLU -lglut (for C program)
g++ MyProg.cpp -lGL -lGLU -lglut (for C++ program)
./a.out
● Once all this installation process is done, you don't need to follow this process again and again. Just
compile and execute the program.
To install OpenGL on system you need to install some basic packages. Open terminal and execute the following commands on terminal.
Step 1: sudo apt-get update
To update your basic packages
Step 2: sudo apt-get install build-essential
For installing essential packages.
Step 3: sudo apt-get install freeglut3 freeglut3-dev
Step 4: sudo apt-get install binutils-gold
Step 5: sudo apt-get install g++ cmake
Step 6: sudo apt-get install mesa-common-dev mesa-utils
Step 7: sudo apt-get install libglew-dev libglew1.5-dev libglm-dev
Step 8: glxinfo | grep OpenGL
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 run with:
gcc MyProg.c -lGL -lGLU -lglut (for C program)
g++ MyProg.cpp -lGL -lGLU -lglut (for C++ program)
./a.out
● Once all this installation process is done, you don't need to follow this process again and again. Just
compile and execute the program.
Thanks alot sir fot the help.
ReplyDeletePlease upload all the programs of DSF,CG and PAI for IT if possible.
Welcome sir shortly all programs will come
Delete