29 files changed, 1185 insertions, 0 deletions
diff --git a/src/view/exp004view.c b/src/view/exp004view.c new file mode 100644 index 0000000..5e3b8ab --- a/dev/null +++ b/src/view/exp004view.c @@ -0,0 +1,44 @@ +#include "../controller/exp004display.h" +#include "../controller/exp004mouse.h" +#include "../controller/exp004reshape.h" +#include "../model/exp004base.h" +#include "exp004view.h" +#include <GL/glut.h> + +void +exp004view (void) +{ + // GLUT Initialization + glutInitWindowSize (500, 500); + glutInitWindowPosition (100, 100); + glutCreateWindow ("Exp004"); + + // GL Initialization + glClearColor (0.0, 0.0, 0.0, 1.0); + glColor3f (1.0, 1.0, 1.0); + glEnable (GL_AUTO_NORMAL); + glEnable (GL_DEPTH_TEST); + glEnable (GL_MAP1_VERTEX_3); + glShadeModel (GL_SMOOTH); + + /* Buffer objects to use. */ + glEnableClientState (GL_COLOR_ARRAY); + glEnableClientState (GL_VERTEX_ARRAY); + + /* Enable Antialiasing as described in "Antialiasing" + [Shreiner,247]. */ + glEnable (GL_LINE_SMOOTH); + glEnable (GL_BLEND); + glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glHint (GL_LINE_SMOOTH_HINT, GL_NICEST); + + // Initialize the model. + exp004base (); + + // Callbacks (Controllers) + glutDisplayFunc (exp004display); + glutMouseFunc (exp004mouse); + glutReshapeFunc (exp004reshape); + + return; +} |