summaryrefslogtreecommitdiffstats
authorDon Pellegrino <don@coffee.donpellegrino.com>2009-08-14 19:19:14 (GMT)
committer Don Pellegrino <don@coffee.donpellegrino.com>2009-08-14 19:19:14 (GMT)
commitedf954cf12cca64868182a0f5a21679b8bf93906 (patch) (side-by-side diff)
treef42b89f9ad4665587fb37bba055e1a1986d1ff03
parent1c5fd5b11e90f6d635345f39b303339a09663d1d (diff)
downloadexp005-edf954cf12cca64868182a0f5a21679b8bf93906.zip
exp005-edf954cf12cca64868182a0f5a21679b8bf93906.tar.gz
exp005-edf954cf12cca64868182a0f5a21679b8bf93906.tar.bz2
Modified to use dynamic memory allocation for the number of nodes.
-rw-r--r--src/controller/clear_selection.sqc14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/controller/clear_selection.sqc b/src/controller/clear_selection.sqc
index b4ff0a3..f43534c 100644
--- a/src/controller/clear_selection.sqc
+++ b/src/controller/clear_selection.sqc
@@ -23,13 +23,17 @@ clear_selection (void)
EXEC SQL COMMIT;
- for (unsigned int i = 0; i < ROWS; i++)
+ for (unsigned int i = 0; i < S.rows; i++)
{
S.selection.set[i] = false;
- S.base_colors_data[i][0] = DEFAULT_COLOR_R;
- S.base_colors_data[i][1] = DEFAULT_COLOR_G;
- S.base_colors_data[i][2] = DEFAULT_COLOR_B;
- S.base_colors_data[i][3] = DEFAULT_COLOR_A;
+ float* c = S.base_colors_data + (i * 4);
+ *c = DEFAULT_COLOR_R;
+ c++;
+ *c = DEFAULT_COLOR_G;
+ c++;
+ *c = DEFAULT_COLOR_B;
+ c++;
+ *c = DEFAULT_COLOR_A;
}
glBindBuffer (GL_ARRAY_BUFFER, S.buffers[BASE_COLORS]);

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.