-rw-r--r-- | src/model/map_geometry.c | 27 | ||||
-rw-r--r-- | src/model/map_geometry.h | 10 |
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 @@ +#include "map_geometry.h" +#include "../view/exp004state0.h" +#include <GL/glut.h> + +#define S exp004state0 + +void +map_geometry (void) +{ + glNewList (S.list_offset + MAP_GEOMETRY, GL_COMPILE); + glPolygonMode (GL_FRONT, GL_FILL); + + for (int i = 0; i < ROWS; i++) + { + glLoadName (i); + glPushMatrix (); + glTranslatef (S.base_vertices_data[i][0], + S.base_vertices_data[i][1], 0.0); + glColor4fv (S.base_colors_data[i]); + glCallList (S.list_offset + PROTEIN_GEOMETRY); + glPopMatrix (); + } + + glEndList (); + + return; +} |