A pure C-lang reintroduction of basic OpenGL application development on the MacOS platform using Xcode, GL/GLUT.
As a first example of using OpenGL in C, this program draws the
classic red/green/blue triangle. It uses the default OpenGL
coordinate system, in which x, y, and z are limited to the range
-1 to 1, and the positive z-axis points into the screen. Note
that this coordinate system is hardly ever used in practice.
When compiling this program, you must link it to the OpenGL library
and to the glut library. For example, in Linux using the gcc compiler,
it can be compiled with the command:
gcc -o first-triangle first-triangle.c -lGL -lglut