author | Don Pellegrino <don@coffee.donpellegrino.com> | 2009-08-14 19:21:32 (GMT) |
---|---|---|
committer | Don Pellegrino <don@coffee.donpellegrino.com> | 2009-08-14 19:21:32 (GMT) |
commit | b816eed89d569d5cdcf6bae708605b80d9f8d13b (patch) (unidiff) | |
tree | e56c219d84671d4586ba75d8d0280134452f2834 | |
parent | dc736fd47fa040ddb5d700bb78b4a0978d1cdb15 (diff) | |
download | exp005-b816eed89d569d5cdcf6bae708605b80d9f8d13b.zip exp005-b816eed89d569d5cdcf6bae708605b80d9f8d13b.tar.gz exp005-b816eed89d569d5cdcf6bae708605b80d9f8d13b.tar.bz2 |
Modified to use dynamic memory allocation for the number of nodes.
-rw-r--r-- | src/controller/selection_from_db.sqc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/controller/selection_from_db.sqc b/src/controller/selection_from_db.sqc index 755c9c9..f40b404 100644 --- a/src/controller/selection_from_db.sqc +++ b/src/controller/selection_from_db.sqc | |||
@@ -45,10 +45,14 @@ selection_from_db (void) | |||
45 | */ | 45 | */ |
46 | // S.selection.set[i] = true; | 46 | // S.selection.set[i] = true; |
47 | 47 | ||
48 | S.base_colors_data[i][0] = vis_sel_set.r; | 48 | float* c = S.base_colors_data + (i * 4); |
49 | S.base_colors_data[i][1] = vis_sel_set.g; | 49 | *c = vis_sel_set.r; |
50 | S.base_colors_data[i][2] = vis_sel_set.b; | 50 | c++; |
51 | S.base_colors_data[i][3] = 0.6; | 51 | *c = vis_sel_set.g; |
52 | c++; | ||
53 | *c = vis_sel_set.b; | ||
54 | c++; | ||
55 | *c = 0.6; | ||
52 | 56 | ||
53 | EXEC SQL FETCH c3 INTO:vis_sel_set; | 57 | EXEC SQL FETCH c3 INTO:vis_sel_set; |
54 | } | 58 | } |