OpenGL

From Schmid.wiki
Jump to: navigation, search

Contents

C

Prerequisites

Installation

Most examples on the web uses OpenGL Utility Toolkit (GLUT), and we'll need to install that on top of the MinGW installation. The downloadable GLUT packages contains libraries for Visual Studio, which are incompatible with MinGW. If we want to use MinGW, libraries in the GNU format are needed.

You can find them here

The easy way to install them is in these locations:

C:\mingw\include\glut.h
C:\mingw\lib\libglut32.a
C:\windows\system\glut32.dll

Compiling

C:\>gcc something.c -lglut32 -lglu32 -lopengl32

If the program uses windows.h, like the Neon Helium OpenGL Tutorials, you must link to the windows libraries also:

C:\>gcc something.c -mwindows -lglut32 -lglu32 -lopengl32

References

Ruby

Prerequisites

Personal tools