What is OpenGL
OpenGL is an free graphics library written in c. This is available for various platforms including C, C++,Java,Android etc. In this article we explain in detail how to install and set up OpenGL library in your Ubuntu 14.04 environment.Before we start setting up the software, We must try to download the required Packages which are explained in the steps bellow.
Setup OpenGL with Ubuntu
Install the mesa-common-dev and freeglut3-dev libraries in your Ubuntu systems. By using the Commands bellow. $ sudo apt-get install mesa-common-dev $ sudo apt-get install freeglut3-dev Once you set up these libraries successfully, You need to just cobfigure your CodeBlocks IDE to start developping the OpenGL project. Before you start developping , first download the codebolocks IDE using the following commands. $ sudo apt-get install codeblocksConfigure Your CodeBlocks IDE for OpenGL
Open the CodeBlocks IDEOnce you are done opening the CodeBlocks, Open the new project, fill the details of the application you are going to create.
NewProject -> OpenGL project-> Fill Project Details ->Select the Compiler (eg : GCC ) -> Finish the setup
Configure your Code Blocks To link all the required Libraries
Perform the Following tasks as shown in bellow images to configure and to add the required flags inorder to make your linker add the required object libraries during linking.Project Properties -> Build Settings -> Build Options -> Linker Setting -> Other Linker Options Add the following flags as specified bellow along with ' - ' sign -lGL -lGLU -lglut
0 comments:
Post a Comment