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