summaryrefslogtreecommitdiffstats
Side-by-side diff
-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.