How to run OpenGL programs in windows Code blocks

 

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 the downloaded freeglut folder,

6a. From the download folder switch to Include > GL and copy all four files 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 the 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 > CodeBlocks > MinGW > lib

6c. Again go to the 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 the 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 a 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 the YouTube channel for video tutorials.

Leave a Comment

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

Welcome to VTUPulse.com


Computer Graphics and Image Processing Mini Projects -> Click Here

Download Final Year Project -> Click Here

This will close in 12 seconds