GLUT - The OpenGL Utility Toolkit 2000/03/22 - GLUT 3 specification is now. Download the GLUT 3.7 beta source distribution (shift Left in Netscape. N32 is supported in IRIX 6.1 and later IRIX releases. The glutdev.sw32.dev system is now marked for install by default since N32 is the default object format in IRIX 6.4. May 29, 2016 Dev-C merupakan kompiler bahasa pemrograman C dan C sehingga kita bisa memanfaatkan API OpenGL ini agar fungsi-fungsi pembuatan citra dapat digunakan pada Dev-C. Langkah-langkah setting OpenGL pada Dev-C adalah sebagai berikut. Download Dev-Cpp 5.4. Ektrak lalu buka folder GLUTMingw32 dan ambil tiga file yaitu glut.h, libglut32.a.
#Pre requisites: 1. Dev C installed, latest version. Knowledge of C with basic idea of GUI programming and working in windows.h #Steps 1. Download this small zip file from here, it contains GLUT, libraries and header files glut.zip 2.
We are currently using the GLUT library at University in our Interface Design and Computer Graphics module. We were told to use Linux (Kubuntu) to write and compile our OpenGL/GLUT programs. But for ease of use, I wanted to install the GLUT library on Windows. I am a user of Dev C++ 4.9.9.2. I know it is no longer under active development, but it still remains my IDE of choice for C++ and C on Windows. And yes, I do know about Code::Blocks, so don’t flame me if I use Dev C++.
So here’s a guide if ever you want to install GLUT on Dev C++. Don’t worry, it’s easy.
Note, this guide is just about installing GLUT, not how to use it. I’ll probably have a small guide on that later on, but for now, this (and the Red Book) should get you started.
![]()
After you install glut, you can do “File – New Project – Multimedia tab” and see that glut has created templates for you. Quite complex things if you ask me. I tend to stay away from those if I can.
Now, before you use any library, you need to link it, else you will get loads of “Linker errors” and “Undefined reference” errors. Here’s how to link the libraries: (read the Dev C++ FAQ!)
9. How can i use the OpenGL library and others ?
All the libraries that comes with Mingw reside in the Lib directory. They are all named in the following way: lib*.a
To link a library with your project, just add in Project Options – Parameters tab – Linker box: -lopengl32 (including the – symbol) This is for including the libopengl32.a library. To add any other library, just follow the same syntax: Type -l (L in lowercase) plus the base name of the library (filename without “lib” and the “.a” extension). Or you can use the “Add Library or Object” button in the parameters tab for simplicity.
I have these libraries linked: “-lglut32 -lglu32 -lopengl32 -lwinmm -lgdi32” and it works fine for me. You can try removing some of the parameters and see if it still works for you. NOTE: The order in which these parameters are supplied is actually important! If you are using a library, and having “undefined reference” errors, try shifting that library’s link parameter to the front of them all.
That’s if you want to use projects. If you are using plain source files, you can put those link parameters in Tools – Compiler Options. Then put them in the “Add these commands to the linker command line“. Make sure the box is checked too. I’d advise you to create a compiler profile just for OpenGL and glut with those parameters. Don’t mess with the “default compiler” profile. You can create one using the small green “+” button there.
There is usually linking information in the header files (.h files) or the Readme files of libraries you download on the Internet.
Basically, to install a library, you will have to copy some files (ending with .lib or .a) to the “lib” folder and some .h files to the “include” folder in Dev C++’s install folder.
Download Glut Library For Dev C++
Now, to actually use glut, you have to include the header file with:
#include <GL/glut.h>
To know the exact path where glut.h is found, look inside the “include” folder, again in Dev C++’s install folder.
Download Glut Dev C++
That’s it. You should now be able to compile and run glut code on Windows using Dev C++. The guide should be clear enough. If there is demand for it, I’ll include pictures too, but I don’t think they are really needed.
By the way, I’m not a glut or OpenGL expert or anything. I’m just studying it, and thought I’d share how I managed to get glut running on Dev C++. I might not be able to answer all your questions, and for that, Google’s here!
Other interesting posts:
Categories: How To, Programming, Tech Posts
Tags: C++, Dev IDE, glut, Guides, OpenGL, Programming, UoM Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |