How to run OpenGL programs in windows Code blocks

 
Video Tutorials
Artificial Intelligence Tutorial
Machine Learning Projects TutorialPython Video tutorial
Computer Graphics Video TutorialC++ Video Tutorial
Big Data Analytics Video TutorialSoft Computing Video Tutorial
Placement Video TutorialJava Video Tutorial

In this tutorial, we will understand how to install code blocks and GLUT (freeglut 3) in windows 7, windows 8.1 or windows 10 and run OpenGL Programs in windows 7, windows 8.1 and windows 10.

Follow the below steps to run OpenGL programs in Windows

Video Tutorial:

Step 1. Download and install CodeBlocks 17.12 mingw. Click here to download the CodeBlocks 17.12 mingw.

Step 2. Once you install the codeblocks then you need to download the freeglut 3.0.0 MinGW Package. Click here to download the freeglut 3.0.0 MinGW Package.

Step 3. Extract the freeglut 3.0.0 MinGW Package.

Step 4. Now, switch to,

For windows 64 bit operating system: This PC > C:(C-drive) > Program Files(x86) > CodeBlocks > share > CodeBlocks > templates

OR

For windows 32 operating system: This PC > C:(C-drive) > Program Files > CodeBlocks > share > CodeBlocks > templates

and open the file glut.cbp

Then search all glut32 and replace with freeglut

Step 5. Now switch to,

For windows 64 bit operating system: This PC:(C-drive) > Program Files(x86) > CodeBlocks > share > CodeBlocks > templates > wizard > glut 

OR

For windows 32 bit operating system: This PC:(C-drive) > Program Files > CodeBlocks > share > CodeBlocks > templates > wizard > glut 

Open wizard.script and here, also replace all glut32 with freeglut

Step 6. Then go to downloaded freeglut folder,

6a. From download folder switch to Include > GL and copy all four file from there. Paste these files in,

For windows 64 bit operating system: This PC > C:(C-drive) > Program Files(x86) > CodeBlocks > MinGW > include > GL

OR

For windows 32 bit operating system: This PC > C:(C-drive) > Program Files > CodeBlocks > MinGW > include > GL

6b. Then, from download folder switch to freeglut > lib, copy two files and paste in,

For windows 64 bit operating system:  This PC > C:(C-drive) > Program Files(x86) > CodeBlocks > MinGW > lib

OR

For windows 32 bit operating system:  This PC > C:(C-drive) > Program Files(x86) > CodeBlocks > MinGW > lib

6c. Again go to downloaded folder freeglut > bin and copy one file (freeglut.dll) and paste in,

For windows 64 bit operating system:  This PC > C:(C-drive) > Windows > SysWOW64

OR

For windows 32 bit operating system:  This PC > C:(C-drive) > Windows > System32

Step 7. Now open Code::Blocks which is installed in step 1.

7a. Select File > New > Project > GLUT project > Next

7b. Give project title anything and then choose Next

7c. For selecting GLUT’s location choose :

For windows 64 bit operating system:  This PC > C:(C-drive) > Program Files(x86) > CodeBlocks > MinGW

OR

For windows 32 bit operating system:  This PC > C:(C-drive) > Program Files > CodeBlocks > MinGW

7d. Press OK > Next > Finish.

Now, Code::Blocks is ready to test for OpenGL File.

Step 8. You will get a standard OpenGL program in main.cpp. Build and run the code.

Thats it. Enjoy executing the OpenGL programs in Windows environment.

In this tutorial, we will understand how to install code blocks and GLUT (freeglut 3) in Windows 7, Windows 8.1 or Windows 10 and run OpenGL Programs in Windows 7, Windows 8.1, and Windows 10. If you like the material share it with your friends. Like the Facebook page for regular updates and YouTube channel for video tutorials.

Leave a Comment

Your email address will not be published. Required fields are marked *