% Porting Irix GL to OpenGL % Abdulmajed Dakkak % June 18th, 2008 > 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_. Includes -------- 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 #else #include #endif IGL does not have the problem of incompatibility, since it only runs on the IRIX systems. #include 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 Main ---- The main function is where [igl] [ogl] [igl]: code/igl.c [ogl]: code/ogl.c