CS 320
Feb. 6, 2009
You'll be using OpenGL with C under Eclipse for these two small projects.
Project
menu and choose Properties
. Expand
the C/C++ Build
node and select Settings
. In the panel to
the right, select Libraries
(under MinGW C Linker
) and add
these three libraries:
opengl32
glu32
glut32
Libraries
and not
Library Search Path
.)
You'll need to perform this step of adding these three libraries for each OpenGL project you create.
pentagon.c
:
#include<GL/glut.h>This should be included in all your projects.
random()
function, but there is a rand()
function defined in
stdlib.h
.)
errorCallback()
, which you can safely ignore.
Look at the functions init() and display(). Can you see any correlation between the code and the images? The man pages for all the OpenGL, GLU, and GLUT functions are installed on phoenix for your perusal.