// sample code to handle the graphics, etc for the flocking project // try number 2 // Date: 10/23/08 // Author: Don Allison #include #include #include #include "boids.h" using namespace std; // quick & dirty globals to make things, well, quick & dirty! const int width = 500; // window width const int height = 500; // window height const int nBoids = 10; // number of critters to flock boids critters[nBoids]; // allocate creature data array void init(void) { glClearColor(0.5, 0.5, 0.9, 1.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); return; } void display(void) { int i; double x, y; glClear(GL_COLOR_BUFFER_BIT); for (i=0; i