-rw-r--r-- | src/model/geometry/map_geometry.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/model/geometry/map_geometry.c b/src/model/geometry/map_geometry.c index 63e409d..72bc747 100644 --- a/src/model/geometry/map_geometry.c +++ b/src/model/geometry/map_geometry.c @@ -10,15 +10,16 @@ map_geometry (void) glNewList (S.list_offset + MAP_GEOMETRY, GL_COMPILE); glPolygonMode (GL_FRONT, GL_FILL); - for (int i = 0; i < ROWS; i++) + for (int i = 0; i < S.rows; i++) { glLoadName (i); // Draw the protein geometry. + float* v = S.base_vertices_data + (i * 2); glPushMatrix (); - glTranslatef (S.base_vertices_data[i][0], - S.base_vertices_data[i][1], 0.0); - glColor4fv (S.base_colors_data[i]); + glTranslatef (*v, + *(v+1), 0.0); + glColor4fv (S.base_colors_data + (i * 4)); glCallList (S.list_offset + PROTEIN_GEOMETRY); glPopMatrix (); @@ -26,8 +27,8 @@ map_geometry (void) if (S.selection.set[i]) { glPushMatrix (); - glTranslatef (S.base_vertices_data[i][0], - S.base_vertices_data[i][1], 0.0); + glTranslatef (*v, + *(v+1), 0.0); glColor4f (0.5, 0.5, 0.5, 1.0); glCallList (S.list_offset + PROTEIN_SELECTED_GEOMETRY); glPopMatrix (); |