Index: new-game.cpp
===================================================================
--- new-game.cpp	(revision f9a242b7652494a12b264ef60cdf86d86404a2eb)
+++ new-game.cpp	(revision e3ca955539753579d1d53adbe352643c6127686e)
@@ -955,5 +955,5 @@
                   SceneObject* selectedObject) {
 
-   vector<int> colored_objs, selected_objs, textured_objs, static_colored_objs, static_textured_objs;
+   vector<int> colored_objs, selected_objs, textured_objs;
 
    // group scene objects by shader and vbo
@@ -961,5 +961,6 @@
       if (selectedObject == &objects[i]) {
          selected_objs.push_back(i);
-      } else if (objects[i].shader_program == color_sp) {
+      }
+      if (objects[i].shader_program == color_sp) {
          colored_objs.push_back(i);
       } else if (objects[i].shader_program == texture_sp) {
@@ -973,15 +974,15 @@
    glBindVertexArray(vao1);
 
+   glBindBuffer(GL_ARRAY_BUFFER, selected_colors_vbo);
+   glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, 0);
+
+   for (it = selected_objs.begin(); it != selected_objs.end(); it++) {
+      glDrawArrays(GL_TRIANGLES, objects[*it].vertex_vbo_offset, objects[*it].num_points);
+   }
+
    glBindBuffer(GL_ARRAY_BUFFER, colors_vbo);
    glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, 0);
 
    for (it = colored_objs.begin(); it != colored_objs.end(); it++) {
-      glDrawArrays(GL_TRIANGLES, objects[*it].vertex_vbo_offset, objects[*it].num_points);
-   }
-
-   glBindBuffer(GL_ARRAY_BUFFER, selected_colors_vbo);
-   glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, 0);
-
-   for (it = selected_objs.begin(); it != selected_objs.end(); it++) {
       glDrawArrays(GL_TRIANGLES, objects[*it].vertex_vbo_offset, objects[*it].num_points);
    }
