summaryrefslogtreecommitdiffstats
Unidiff
-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 @@
1#include "../controller/callbacks/display.h"
2#include "../controller/callbacks/keyboard.h"
3#include "../controller/callbacks/mouse.h"
4#include "../controller/callbacks/mouse_wheel.h"
5#include "../controller/callbacks/reshape.h"
6#include "../db/dbconnect.h"
7#include "init.h"
8#include "state0.h"
9#include "view.h"
10#include <GL/freeglut.h>
11#include <GL/freeglut_ext.h>
12#include <GL/glut.h>
13
14void
15view (void)
16{
17 // Connect to the database.
18 dbconnect ();
19
20 // GLUT Initialization
21 glutInitWindowSize (500, 500);
22 glutInitWindowPosition (100, 100);
23 glutCreateWindow ("Exp004");
24
25 // GL Initialization
26 glClearColor (CLEAR_COLOR);
27 glColor3f (DRAW_COLOR);
28 glEnable (GL_AUTO_NORMAL);
29 glDisable (GL_DEPTH_TEST);
30 glEnable (GL_MAP1_VERTEX_3);
31 glShadeModel (GL_SMOOTH);
32
33 /* Buffer objects to use. */
34 glEnableClientState (GL_COLOR_ARRAY);
35 glEnableClientState (GL_VERTEX_ARRAY);
36
37 /* Enable Antialiasing as described in "Antialiasing"
38 [Shreiner,247]. */
39 glEnable (GL_LINE_SMOOTH);
40 glEnable (GL_BLEND);
41 glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
42 glHint (GL_LINE_SMOOTH_HINT, GL_NICEST);
43
44 // Initialize the model.
45 init ();
46
47 // Callbacks
48 glutDisplayFunc (display);
49 glutKeyboardFunc (keyboard);
50 glutMouseFunc (mouse);
51 glutMouseWheelFunc (mouse_wheel);
52 glutReshapeFunc (reshape);
53
54 return;
55}

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.