From b816eed89d569d5cdcf6bae708605b80d9f8d13b Mon Sep 17 00:00:00 2001 From: Don Pellegrino Date: Fri, 14 Aug 2009 19:21:32 +0000 Subject: Modified to use dynamic memory allocation for the number of nodes. --- 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; } -- cgit v0.8.3.1-22-g547a