Index: TODO.txt
===================================================================
--- TODO.txt	(revision 7e106674c060e8d918013011c754ad9b0e79b951)
+++ TODO.txt	(revision c55614aa8c698a1ffb2b855ca2f2bb1af19c4908)
@@ -3,6 +3,6 @@
 -Change the logger class to use cout instead of printf. Consider how easy variable argument support would be.
 -Change all error messages to use the logger class so they get printed to the log file as well.
--Make sure fullscreen works correctly on OSX. Check the book to see how to handle Retina Display.
 -Add code to allow for resizing/maximizing the window
+-Add logic to make imgui element placement depedent on the window size so it works in fullscreen
 -Check the book's "Printing Parameters from the GL Context" to output a bunch of OpenGL context params
 -Move some common functions into a Utils class
@@ -12,4 +12,5 @@
 -Print a warning if texture images don't have sizes of 2^x
 -Fix the texture-mapping code to not flip the texture upside down.
+-Make sure fullscreen works correctly on OSX. Check the book to see how to handle Retina Display.
 
 NEW TODO
@@ -38,6 +39,10 @@
 ===================================
 
+2. Inside populateBuffers, check for the object type and resize all buffers of that type (will eventually do this in a loop)
+
+STEPS TO SWITCH OFF OF GLOBAL VBOS DONE
+========================================
+
 1. Remove buffer re-assignment when creating shader model groups
-2. Inside populateBuffers, check for the object type and resize all buffers of that type (will eventually do this in a loop)
 3. In copyObjectData, set vertex_vbo_offset for the object type only using numPoints, not vbo_base
 4. in renderScene, change the glDrawArrays call to use an offset of 0
Index: new-game.cpp
===================================================================
--- new-game.cpp	(revision 7e106674c060e8d918013011c754ad9b0e79b951)
+++ new-game.cpp	(revision c55614aa8c698a1ffb2b855ca2f2bb1af19c4908)
@@ -609,4 +609,6 @@
       (Also, I bookmarked a great explanation of this under )
 
+      CHECK MY OpenGL BOOKMARK CALLED "Learn OpenGL: Advanced GLSL"
+
       No, you're misunderstanding how this works. UBO binding works exactly like texture object binding.
 
@@ -2099,62 +2101,10 @@
       smg->vboCapacity = shaderCounts[smg->shaderProgram] * 2;
 
-      AttribInfo* attrib;
-
-      if (modelGroupIt->first == TYPE_SHIP) {
-         attrib = &smg->attribs["vertex_position"];
-         glBindBuffer(GL_ARRAY_BUFFER, attrib->buffer);
-         glBufferData(GL_ARRAY_BUFFER, smg->vboCapacity * GLsizeof(attrib->type) * attrib->size, NULL, GL_DYNAMIC_DRAW);
-
-         attrib = &smg->attribs["vertex_color"];
-         glBindBuffer(GL_ARRAY_BUFFER, attrib->buffer);
-         glBufferData(GL_ARRAY_BUFFER, smg->vboCapacity * GLsizeof(attrib->type) * attrib->size, NULL, GL_DYNAMIC_DRAW);
-
-         attrib = &smg->attribs["vertex_normal"];
-         glBindBuffer(GL_ARRAY_BUFFER, attrib->buffer);
-         glBufferData(GL_ARRAY_BUFFER, smg->vboCapacity * GLsizeof(attrib->type) * attrib->size, NULL, GL_DYNAMIC_DRAW);
-
-         attrib = &smg->attribs["ubo_index"];
-         glBindBuffer(GL_ARRAY_BUFFER, attrib->buffer);
-         glBufferData(GL_ARRAY_BUFFER, smg->vboCapacity * GLsizeof(attrib->type) * attrib->size, NULL, GL_DYNAMIC_DRAW);
-      } else if (modelGroupIt->first == TYPE_ASTEROID) {
-         attrib = &smg->attribs["vertex_position"];
-         glBindBuffer(GL_ARRAY_BUFFER, attrib->buffer);
-         glBufferData(GL_ARRAY_BUFFER, smg->vboCapacity * GLsizeof(attrib->type) * attrib->size, NULL, GL_DYNAMIC_DRAW);
-
-         attrib = &smg->attribs["vertex_color"];
-         glBindBuffer(GL_ARRAY_BUFFER, attrib->buffer);
-         glBufferData(GL_ARRAY_BUFFER, smg->vboCapacity * GLsizeof(attrib->type) * attrib->size, NULL, GL_DYNAMIC_DRAW);
-
-         attrib = &smg->attribs["vertex_normal"];
-         glBindBuffer(GL_ARRAY_BUFFER, attrib->buffer);
-         glBufferData(GL_ARRAY_BUFFER, smg->vboCapacity * GLsizeof(attrib->type) * attrib->size, NULL, GL_DYNAMIC_DRAW);
-
-         attrib = &smg->attribs["ubo_index"];
-         glBindBuffer(GL_ARRAY_BUFFER, attrib->buffer);
-         glBufferData(GL_ARRAY_BUFFER, smg->vboCapacity * GLsizeof(attrib->type) * attrib->size, NULL, GL_DYNAMIC_DRAW);
-      } else if (modelGroupIt->first == TYPE_LASER) {
-         attrib = &smg->attribs["vertex_position"];
-         glBindBuffer(GL_ARRAY_BUFFER, attrib->buffer);
-         glBufferData(GL_ARRAY_BUFFER, smg->vboCapacity * GLsizeof(attrib->type) * attrib->size, NULL, GL_DYNAMIC_DRAW);
-
-         attrib = &smg->attribs["vt"];
-         glBindBuffer(GL_ARRAY_BUFFER, attrib->buffer);
-         glBufferData(GL_ARRAY_BUFFER, smg->vboCapacity * GLsizeof(attrib->type) * attrib->size, NULL, GL_DYNAMIC_DRAW);
-
-         attrib = &smg->attribs["ubo_index"];
-         glBindBuffer(GL_ARRAY_BUFFER, attrib->buffer);
-         glBufferData(GL_ARRAY_BUFFER, smg->vboCapacity * GLsizeof(attrib->type) * attrib->size, NULL, GL_DYNAMIC_DRAW);
-      } else if (modelGroupIt->first == TYPE_EXPLOSION) {
-         attrib = &smg->attribs["v_i"];
-         glBindBuffer(GL_ARRAY_BUFFER, attrib->buffer);
-         glBufferData(GL_ARRAY_BUFFER, smg->vboCapacity * GLsizeof(attrib->type) * attrib->size, NULL, GL_DYNAMIC_DRAW);
-
-         attrib = &smg->attribs["start_time"];
-         glBindBuffer(GL_ARRAY_BUFFER, attrib->buffer);
-         glBufferData(GL_ARRAY_BUFFER, smg->vboCapacity * GLsizeof(attrib->type) * attrib->size, NULL, GL_DYNAMIC_DRAW);
-
-         attrib = &smg->attribs["ubo_index"];
-         glBindBuffer(GL_ARRAY_BUFFER, attrib->buffer);
-         glBufferData(GL_ARRAY_BUFFER, smg->vboCapacity * GLsizeof(attrib->type) * attrib->size, NULL, GL_DYNAMIC_DRAW);
+      map<string, AttribInfo>::iterator attrIt;
+      for (attrIt = smg->attribs.begin(); attrIt != smg->attribs.end(); attrIt++) {
+         if (attrIt->second.attribType != ATTRIB_UNIFORM) {
+            glBindBuffer(GL_ARRAY_BUFFER, attrIt->second.buffer);
+            glBufferData(GL_ARRAY_BUFFER, smg->vboCapacity * GLsizeof(attrIt->second.type) * attrIt->second.size, NULL, GL_DYNAMIC_DRAW);
+         }
       }
    }
