summaryrefslogtreecommitdiffstats
Unidiff
-rw-r--r--src/model/map_geometry.c27
-rw-r--r--src/model/map_geometry.h10
2 files changed, 37 insertions, 0 deletions
diff --git a/src/model/map_geometry.c b/src/model/map_geometry.c
new file mode 100644
index 0000000..31154da
--- a/dev/null
+++ b/src/model/map_geometry.c
@@ -0,0 +1,27 @@
1#include "map_geometry.h"
2#include "../view/exp004state0.h"
3#include <GL/glut.h>
4
5#define S exp004state0
6
7void
8map_geometry (void)
9{
10 glNewList (S.list_offset + MAP_GEOMETRY, GL_COMPILE);
11 glPolygonMode (GL_FRONT, GL_FILL);
12
13 for (int i = 0; i < ROWS; i++)
14 {
15 glLoadName (i);
16 glPushMatrix ();
17 glTranslatef (S.base_vertices_data[i][0],
18 S.base_vertices_data[i][1], 0.0);
19 glColor4fv (S.base_colors_data[i]);
20 glCallList (S.list_offset + PROTEIN_GEOMETRY);
21 glPopMatrix ();
22 }
23
24 glEndList ();
25
26 return;
27}
diff --git a/src/model/map_geometry.h b/src/model/map_geometry.h
new file mode 100644
index 0000000..f5b6701
--- a/dev/null
+++ b/src/model/map_geometry.h
@@ -0,0 +1,10 @@
1#ifndef MAP_GEOMETRY_H
2#define MAP_GEOMETRY_H
3
4/*
5 * Create the geometry for the map. This includes the geometry for
6 * every point.
7 */
8void map_geometry (void);
9
10#endif // MAP_GEOMETRY_H

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.