Two OpenGL-assignments

Here is a simple OpenGL-assignment. To create your program you need an editor, use your favourite, if you have one. If that is not the case you can try gedit.

How to compile and link

If your program is called lab.c give the command (on the student lab-computers):

gcc -O3 lab.c -lGL -lGLU -lglut -lm

When debugging you do not need to switch on optimization (-O3).

If you declare a loop variable in the for-loop, for(int k = 0 etc. you must add -std=c99, so

gcc -std=c99 -O3 lab.c -lGL -lGLU -lglut -lm