Note: The following is a draft. If you’d like to add anything, then please send them to my email and I will add your content and your name to this document.
The objective of this document is to detail how one goes about translating legacy Irix GL programs into OpenGL. In this document we opt for manual conversion, rather than automatic, to aid us in understanding OpenGL better.
For shorthand, we will refer to OpenGL programs as ogl, while Irix GL as igl.
IGL requires the glut
libraries which are either a subdirectory of GLUT
, as is the case in OSX, or GL
in Linux. We place an ifdef/endif
preprocessing condition to make our program compatible on both OS’s.
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
IGL does not have the problem of incompatibility, since it only runs on the IRIX systems.
#include <gl.h>
You must import the device.h
header if you require mouse interaction with your software. In this program we do. Note that this is not required in OGL.
#include <device.h>
The main function is where