-rw-r--r-- | src/Makefile.am | 3 | ||||
-rw-r--r-- | src/model/display_list_index.h | 6 | ||||
-rw-r--r-- | src/model/exp004state.h | 6 | ||||
-rw-r--r-- | src/model/protein_geometry.c | 21 | ||||
-rw-r--r-- | src/model/protein_geometry.h | 9 | ||||
-rw-r--r-- | src/view/exp004geometry.c | 21 | ||||
-rw-r--r-- | src/view/exp004init.c | 3 | ||||
-rw-r--r-- | src/view/exp004view.c | 2 |
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 @@ | |||
6 | #include "exp004state0.h" | 6 | #include "exp004state0.h" |
7 | #include <GL/glut.h> | 7 | #include <GL/glut.h> |
8 | 8 | ||
9 | #define S exp004state0 | ||
10 | |||
9 | void | 11 | void |
10 | exp004geometry (GLenum mode) | 12 | exp004geometry (GLenum mode) |
11 | { | 13 | { |
@@ -15,17 +17,16 @@ exp004geometry (GLenum mode) | |||
15 | glPointSize (0.1); | 17 | glPointSize (0.1); |
16 | glColor3f (0.2, 0.2, 0.2); | 18 | glColor3f (0.2, 0.2, 0.2); |
17 | 19 | ||
18 | if (mode == GL_SELECT) | 20 | for (int i = 0; i < ROWS; i++) |
19 | { | ||
20 | for (int i = 0; i < ROWS; i++) | ||
21 | { | ||
22 | glLoadName (i); | ||
23 | glDrawArrays (GL_POINTS, i, 1); | ||
24 | } | ||
25 | } | ||
26 | else | ||
27 | { | 21 | { |
28 | glDrawArrays (GL_POINTS, 0, ROWS); | 22 | glLoadName (i); |
23 | glPushMatrix (); | ||
24 | glTranslatef (S.base_vertices_data[i][0], | ||
25 | S.base_vertices_data[i][1], | ||
26 | 0.0); | ||
27 | glColor4fv (S.base_colors_data[i]); | ||
28 | glCallList (S.list_offset + PROTEIN_GEOMETRY); | ||
29 | glPopMatrix (); | ||
29 | } | 30 | } |
30 | 31 | ||
31 | return; | 32 | return; |