#include "dim.h" #include #include #include int fb[BUFFWIDTH][BUFFHEIGHT]; /* the simulated frame buffer*/ int width=500,height=500; /* initial window size */ float pixwidth = (float) width/BUFFWIDTH; /* simulated pixel width */ float pixheight = (float) height/BUFFHEIGHT; /* simulated pixel height */ enum mode {Fill, NoFill}; /* possible modes of program */ mode currmode=Fill; /* initially Fill mode*/ // int vptx0, vptx1, vpty0, vpty1; /* uncomment for viewport void init() { glClearColor(0.0,0.0,0.0,0.0); /* clear color is black */ for (int i=0; i