Installing the GLUT.H library

shape
shape
shape
shape
shape
shape
shape
shape

According to [Scheiner,2004], OpenGL provides a set of very important commands for modeling and visualizing geometric objects. However, these commands are very primitive in the sense that they provide a low level of design that must be implemented using these commands. Furthermore, as OpenGL does not contain window management functions, it would also be necessary to work with the windowing system available in the Operating System environment.

To facilitate the development of graphical applications, some libraries have been created that provide greater abstraction, as well as functions for creating windows and managing events. Among the various libraries and toolkits that exist today, the most widely used are GLU.h and GLUT.h.

GLUT is suitable for learning to program in OpenGL and for building small applications. When developing more complex programs that require a more elaborate interface, it is necessary to work with the operating environment’s windowing system or use another, more complete toolkit.

 

INSTALLING GLUT IN DEV-C++

Download DEV-C++;

Download GLUT;

Right after downloading:

  • Install the Dev-C++ compiler;
  • Go to the Tools/Updates menu;

  • Click on the WebUpdate window;
  • Select the devpaks.org server;
  • Click on Check for updates;
  • A list of available packages will appear on the screen;
  • Select the OpenGL group (under Groups)
  • Mark the line containing the glut;

That’s it! Now we’ll start creating our application.

Open Dev-C++, open the File menu and select the New/Project option, a window will appear, click on the Multimedia tab, then the glut icon, define a name for the project and select the language to be used (choose C++).

Click OK.

Dev-C++ then prompts you for the name of the file that will store the project information. Set a name and save the file in the directory of your choice. Once all this has been done successfully, the Dev-C++ environment will be created.

Testing the Library:

  • Click on the “+” in the top left-hand corner;

  • Now let’s compile main;
  • Click on the colored button as in the image below:

  • It will soon appear:
  • If this window appears on your screen, the installation was a success.

At this point you’re probably wondering why I’ve posted the second download. If you don’t manage to download the library via Dev-C++’s own update option, you’ll have to copy the files into the folder you downloaded and paste them into the directory where Dev-C++ was installed;

Ex: C:\Dev-Cpp

You can replace the existing files.

 

Bibliography

Isabel Harb Manssour -OpenGL – A Practical and Objective Approach

Leave a Reply

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

Latest news

Latest news directly from our blog.