void myDisplayFunction(void) { glClear(GL_COLOR_BUFFER_BIT); glLoadIdentity(); gluLookAt(0.0, 30.0, 100.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); RenderToDisplay(); glutSwapBuffers(); }
//this acts as a replacement for GL_FillRect void GL_FillRect(int x, int y, int w, int h, int color){ //clear the color buffer //glClear( GL_COLOR_BUFFER_BIT ); // quadrilateral glBegin(GL_QUADS); //process color glColor3ub(color/0x10000, (color/0x100)&0xff, color&0xff ); //generate verticies glVertex2s(x, y ); glVertex2s(x+h, y ); glVertex2s(x+h, y+h ); glVertex2s(x, y+h ); //end the quad glEnd(); RenderToDisplay(); }