33 files changed, 530 insertions, 113 deletions
diff --git a/src/view/init.c b/src/view/init.c new file mode 100644 index 0000000..e32a75e --- a/dev/null +++ b/src/view/init.c @@ -0,0 +1,43 @@ +#include "init.h" +#include "state0.h" +#include "../model/geometry/density_legend_geometry.h" +#include "../model/geometry/map_geometry.h" +#include "../model/geometry/protein_geometry.h" +#include "../model/geometry/protein_selected_geometry.h" +#include "../model/selection_info_init.h" +#include "../model/zoom_info_init.h" +#include "../model/base.h" +#include <GL/glut.h> + +#define S state0 + +void +init (void) +{ + /* + * Initialize default values, zero memory and NULL pointers. + */ + S.rows = 0; + S.gi_data = NULL; + S.base_vertices_data = NULL; + S.base_colors_data = NULL; + selection_info_init (&S.selection); + zoom_info_init (&S.zoom); + S.legend = true; + + /* + * Load the data. + */ + base (); + + /* + * Create the geometry based on the data. + */ + S.list_offset = glGenLists (NUM_LISTS); + protein_geometry (); + protein_selected_geometry (); + density_legend_geometry (); + map_geometry (); + + return; +} |