The document provides instructions for installing OpenGL on Ubuntu and Windows using Code::Blocks. For Ubuntu, it describes running an apt-get command to install required packages. For Windows, it gives detailed steps to download and configure Code::Blocks and freeglut to enable OpenGL development.
The document provides instructions for installing OpenGL on Ubuntu and Windows using Code::Blocks. For Ubuntu, it describes running an apt-get command to install required packages. For Windows, it gives detailed steps to download and configure Code::Blocks and freeglut to enable OpenGL development.
For installing OpenGL on Ubuntu, just execute the following command in terminal: sudo apt-get install freeglut3-dev For working on Ubuntu operating system: gcc filename.c -lGL -lGLU -lglut where filename.c is the name of the file with which this program is saved.
Install OpenGL on windows in Code::Blocks
1. Download code block and install it 2. Go to the link (https://www.transmissionzero.co.uk/software/freeglut- devel/) and download zip file from the download link that appears after freeglut MinGW package with having link name as Download freeglut 3.0.0 for MinGW and extract it. Or use zip file what I am sharing with you. 3. Open notepad with run as administrator and open file from 1. This PC > C:(C-drive) > Program Files(x86) > CodeBlocks > share > CodeBlocks > templates, (then click to show All Files) 2. Next, open glut.cbp and search all glut32 and replace with freeglut. 3. Then, open from This PC > C:(C-drive) > Program Files(x86) > CodeBlocks > share > CodeBlocks > templates > wizard > glut (then click to show All Files) 4. Open wizard.script and here, also replace all glut32 with freeglut 4. Then go to freeglut folder (where it was downloaded) and 1. Include > GL and copy all four file from there 2. Go to This PC > C:(C-drive) > Program Files(x86) > CodeBlocks > MinGW > include > GL and paste it. 3. Then, from download folder freeglut > lib, copy two files and go to This PC > C:(C-drive) > Program Files(x86) > CodeBlocks > MinGW > lib and paste it. 4. Again go to downloaded folder freeglut > bin and copy one file (freeglut.dll) from here and go to This PC > C:(C-drive) > Windows > SysWOW64 and paste this file. 5. Now open Code::Blocks. 1. Select File > New > Project > GLUT project > Next. 2. Give project title anything and then choose Next. 3. For selecting GLUT’s location : This PC > C:(C-drive) > Program Files(x86) > CodeBlocks > MinGW. 4. Press OK > Next > Finish. Now, Code::Blocks is ready to test for OpenGL File.