-rw-r--r-- | src/view/exp004init.c | 15 | ||||
-rw-r--r-- | src/view/exp004view.c | 2 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/view/exp004init.c b/src/view/exp004init.c index 30d8d96..5a6ddd0 100644 --- a/src/view/exp004init.c +++ b/src/view/exp004init.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include "../model/geometry/protein_selected_geometry.h" | 6 | #include "../model/geometry/protein_selected_geometry.h" |
7 | #include "../model/selection_info_init.h" | 7 | #include "../model/selection_info_init.h" |
8 | #include "../model/zoom_info_init.h" | 8 | #include "../model/zoom_info_init.h" |
9 | #include "../model/exp004base.h" | ||
9 | #include <GL/glut.h> | 10 | #include <GL/glut.h> |
10 | 11 | ||
11 | #define S exp004state0 | 12 | #define S exp004state0 |
@@ -13,10 +14,24 @@ | |||
13 | void | 14 | void |
14 | exp004init (void) | 15 | exp004init (void) |
15 | { | 16 | { |
17 | /* | ||
18 | * Initialize default values, zero memory and NULL pointers. | ||
19 | */ | ||
20 | S.rows = 0; | ||
21 | S.base_vertices_data = NULL; | ||
22 | S.base_colors_data = NULL; | ||
16 | selection_info_init (&S.selection); | 23 | selection_info_init (&S.selection); |
17 | zoom_info_init (&S.zoom); | 24 | zoom_info_init (&S.zoom); |
18 | S.legend = true; | 25 | S.legend = true; |
19 | 26 | ||
27 | /* | ||
28 | * Load the data. | ||
29 | */ | ||
30 | exp004base (); | ||
31 | |||
32 | /* | ||
33 | * Create the geometry based on the data. | ||
34 | */ | ||
20 | S.list_offset = glGenLists (NUM_LISTS); | 35 | S.list_offset = glGenLists (NUM_LISTS); |
21 | protein_geometry (); | 36 | protein_geometry (); |
22 | protein_selected_geometry (); | 37 | protein_selected_geometry (); |
diff --git a/src/view/exp004view.c b/src/view/exp004view.c index 33198ad..92cb56e 100644 --- a/src/view/exp004view.c +++ b/src/view/exp004view.c | |||
@@ -3,7 +3,6 @@ | |||
3 | #include "../controller/exp004reshape.h" | 3 | #include "../controller/exp004reshape.h" |
4 | #include "../controller/keyboard.h" | 4 | #include "../controller/keyboard.h" |
5 | #include "../db/dbconnect.h" | 5 | #include "../db/dbconnect.h" |
6 | #include "../model/exp004base.h" | ||
7 | #include "exp004init.h" | 6 | #include "exp004init.h" |
8 | #include "exp004state0.h" | 7 | #include "exp004state0.h" |
9 | #include "exp004view.h" | 8 | #include "exp004view.h" |
@@ -40,7 +39,6 @@ exp004view (void) | |||
40 | glHint (GL_LINE_SMOOTH_HINT, GL_NICEST); | 39 | glHint (GL_LINE_SMOOTH_HINT, GL_NICEST); |
41 | 40 | ||
42 | // Initialize the model. | 41 | // Initialize the model. |
43 | exp004base (); | ||
44 | exp004init (); | 42 | exp004init (); |
45 | 43 | ||
46 | // Callbacks (Controllers) | 44 | // Callbacks (Controllers) |