summaryrefslogtreecommitdiffstats
Side-by-side diff
-rw-r--r--src/Makefile.am3
-rw-r--r--src/model/display_list_index.h6
-rw-r--r--src/model/exp004state.h6
-rw-r--r--src/model/protein_geometry.c21
-rw-r--r--src/model/protein_geometry.h9
-rw-r--r--src/view/exp004geometry.c21
-rw-r--r--src/view/exp004init.c3
-rw-r--r--src/view/exp004view.c2
8 files changed, 61 insertions, 10 deletions
diff --git a/src/view/exp004geometry.c b/src/view/exp004geometry.c
index b34d7f3..e7193fd 100644
--- a/src/view/exp004geometry.c
+++ b/src/view/exp004geometry.c
@@ -6,6 +6,8 @@
#include "exp004state0.h"
#include <GL/glut.h>
+#define S exp004state0
+
void
exp004geometry (GLenum mode)
{
@@ -15,17 +17,16 @@ exp004geometry (GLenum mode)
glPointSize (0.1);
glColor3f (0.2, 0.2, 0.2);
- if (mode == GL_SELECT)
- {
- for (int i = 0; i < ROWS; i++)
- {
- glLoadName (i);
- glDrawArrays (GL_POINTS, i, 1);
- }
- }
- else
+ for (int i = 0; i < ROWS; i++)
{
- glDrawArrays (GL_POINTS, 0, ROWS);
+ 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 ();
}
return;

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.