summaryrefslogtreecommitdiffstats
Side-by-side diff
-rw-r--r--src/Makefile.am30
-rw-r--r--src/controller/actions/clear_selection.sqc4
-rw-r--r--src/controller/actions/process_hits.c4
-rw-r--r--src/controller/actions/sel_save.c6
-rw-r--r--src/controller/actions/sel_save.sqc4
-rw-r--r--src/controller/actions/selection_from_db.sqc4
-rw-r--r--src/controller/actions/set_ortho.c4
-rw-r--r--src/controller/actions/zoom.c4
-rw-r--r--src/controller/callbacks/display.c4
-rw-r--r--src/controller/callbacks/keyboard.c4
-rw-r--r--src/controller/callbacks/mouse.c8
-rw-r--r--src/controller/callbacks/reshape.c4
-rw-r--r--src/flumap.c (renamed from src/exp004viz.c)4
-rw-r--r--src/model/base.c417
-rw-r--r--src/model/base.h9
-rw-r--r--src/model/base.sqc (renamed from src/model/exp004base.sqc)8
-rw-r--r--src/model/exp004base.h9
-rw-r--r--src/model/geometry/density_legend_geometry.c4
-rw-r--r--src/model/geometry/map_geometry.c4
-rw-r--r--src/model/geometry/protein_geometry.c4
-rw-r--r--src/model/geometry/protein_selected_geometry.c4
-rw-r--r--src/model/state.h (renamed from src/model/exp004state.h)8
-rw-r--r--src/view/exp004geometry.h8
-rw-r--r--src/view/exp004init.h9
-rw-r--r--src/view/exp004state0.h8
-rw-r--r--src/view/exp004view.h6
-rw-r--r--src/view/geometry.c (renamed from src/view/exp004geometry.c)8
-rw-r--r--src/view/geometry.h8
-rw-r--r--src/view/init.c (renamed from src/view/exp004init.c)12
-rw-r--r--src/view/init.h9
-rw-r--r--src/view/state0.h8
-rw-r--r--src/view/view.c (renamed from src/view/exp004view.c)10
-rw-r--r--src/view/view.h6
33 files changed, 530 insertions, 113 deletions
diff --git a/src/view/view.c b/src/view/view.c
new file mode 100644
index 0000000..db3be6d
--- a/dev/null
+++ b/src/view/view.c
@@ -0,0 +1,55 @@
+#include "../controller/callbacks/display.h"
+#include "../controller/callbacks/keyboard.h"
+#include "../controller/callbacks/mouse.h"
+#include "../controller/callbacks/mouse_wheel.h"
+#include "../controller/callbacks/reshape.h"
+#include "../db/dbconnect.h"
+#include "init.h"
+#include "state0.h"
+#include "view.h"
+#include <GL/freeglut.h>
+#include <GL/freeglut_ext.h>
+#include <GL/glut.h>
+
+void
+view (void)
+{
+ // Connect to the database.
+ dbconnect ();
+
+ // GLUT Initialization
+ glutInitWindowSize (500, 500);
+ glutInitWindowPosition (100, 100);
+ glutCreateWindow ("Exp004");
+
+ // GL Initialization
+ glClearColor (CLEAR_COLOR);
+ glColor3f (DRAW_COLOR);
+ glEnable (GL_AUTO_NORMAL);
+ glDisable (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.
+ init ();
+
+ // Callbacks
+ glutDisplayFunc (display);
+ glutKeyboardFunc (keyboard);
+ glutMouseFunc (mouse);
+ glutMouseWheelFunc (mouse_wheel);
+ glutReshapeFunc (reshape);
+
+ return;
+}

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.