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) (side-by-side diff) | |
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) */ // S.selection.set[i] = true; - S.base_colors_data[i][0] = vis_sel_set.r; - S.base_colors_data[i][1] = vis_sel_set.g; - S.base_colors_data[i][2] = vis_sel_set.b; - S.base_colors_data[i][3] = 0.6; + float* c = S.base_colors_data + (i * 4); + *c = vis_sel_set.r; + c++; + *c = vis_sel_set.g; + c++; + *c = vis_sel_set.b; + c++; + *c = 0.6; EXEC SQL FETCH c3 INTO:vis_sel_set; } |