Use Opengl With Code Blocks

OpenGL is a library devoted to generating 3D graphics.

OpenGL is an open source graphics library that allows you to develop 3D graphics applications. Since it is open source, it is free to use and modify as you see fit. The Integrated Development Environment (IDE) software — known as Code::Blocks — has built-in OpenGL support, making it very easy to get started with development. You can create a very basic OpenGL application in seconds using Code::Blocks. This application will display an animated, multi-colored pyramid using OpenGL and C++.

Instructions

1. Launch the Code::Blocks application by clicking on its application link. The program loads momentarily.

2. Click on the menu item named “File” and select “New” from the sub-menu that appears. Select “Project” from the next sub-menu that appears. A “New Project Dialogue” box appears.

3. Select “OpenGL Project” from the list of available projects. You may need to scroll down to see it listed.

4. Click on the “Go” button to proceed. A “Welcome” screen appears.

5. Click on the “Next” button to proceed past the “Welcome” screen. A new page opens, which features four text boxes.

6. Enter a name for the project in the first box. This is all you need to do to create a new project; but you can change the location where the project is saved by altering the path listed in the second text box.

7. Click on the “Finish” button to create the new OpenGL project. This project is not empty, for it contains a source code file that imports all of the necessary OpenGL libraries. It even demonstrates the capabilities of OpenGL by creating a spinning pyramid animation.

READ  Make A 3d Pop Up Book

8. Press the “F9” key to build and run the application. A window appears with a spinning, colored pyramid.