/******************************************************************* Main function for CS480/CS680 Programming Assignment 1 ******************************************************************** Author: Stan Sclaroff Comments: Initialize GLUT window, callbacks, and pixel draw buffer. The program initializes program for drawing lines. The user can operate the line tool using the following interface: Mouse buttons left -- triangle vertex points right -- line vertex points Keyboard input c,C -- clear pixel buffer r,R -- change red amount of draw color g,G -- change green amount of draw color b,B -- change blue amount of draw color l,L -- display line test patterns t,T -- display triangle test patterns s,S -- toggle smooth shading <,> -- decrease / increase number of steps for line and triangle test cases q,Q, -- quit line draw tool ********************************************************************/ #include #include "types.h" #include "funcs.h" #define pixelBufferWidth 256 #define pixelBufferHeight 256 int main(int argc,char *argv[]) { glutInit(&argc,argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowSize(pixelBufferWidth, pixelBufferHeight); glutCreateWindow(argv[0]); init(pixelBufferWidth,pixelBufferHeight); glutDisplayFunc(display); glutReshapeFunc(reshape); glutKeyboardFunc(keyboard); glutMouseFunc(mouseButton); glutMainLoop(); return 0; }