Index: new-game.cpp
===================================================================
--- new-game.cpp	(revision b220f7851c4ed247babdc756bef7299c365b7e40)
+++ new-game.cpp	(revision de53394295d2f6a87aace959a1087e3698726487)
@@ -200,4 +200,6 @@
                   GLuint* texcoords_vbo,
                   GLuint* normals_vbo,
+                  GLuint* time_vbo,
+                  GLuint* velocity_vbo,
                   GLuint* ubo,
                   GLuint* model_mat_idx_vbo);
@@ -210,4 +212,6 @@
                   GLuint texcoords_vbo,
                   GLuint normals_vbo,
+                  GLuint time_vbo,
+                  GLuint velocity_vbo,
                   GLuint ubo,
                   GLuint model_mat_idx_vbo);
@@ -482,5 +486,13 @@
    GLfloat curTime, prevTime, elapsedTime;
 
-   GLuint points_vbo, colors_vbo, texcoords_vbo, normals_vbo, ubo, model_mat_idx_vbo;
+   GLuint
+    points_vbo,
+    colors_vbo,
+    texcoords_vbo,
+    normals_vbo,
+    time_vbo,
+    velocity_vbo,
+    ubo,
+    model_mat_idx_vbo;
 
    initializeBuffers(
@@ -489,4 +501,6 @@
       &texcoords_vbo,
       &normals_vbo,
+      &time_vbo,
+      &velocity_vbo,
       &ubo,
       &model_mat_idx_vbo);
@@ -625,4 +639,10 @@
   initModelGroupAttribs(modelGroups[TYPE_EXPLOSION]);
 
+   glBindBuffer(GL_ARRAY_BUFFER, velocity_vbo);
+   glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, NULL);
+
+   glBindBuffer(GL_ARRAY_BUFFER, time_vbo);
+   glVertexAttribPointer(1, 1, GL_FLOAT, GL_FALSE, 0, NULL);
+
    cam_pos = vec3(0.0f, 0.0f, 2.0f);
    float cam_yaw = 0.0f * 2.0f * 3.14159f / 360.0f;
@@ -683,4 +703,6 @@
       texcoords_vbo,
       normals_vbo,
+      time_vbo,
+      velocity_vbo,
       ubo,
       model_mat_idx_vbo);
@@ -2115,4 +2137,6 @@
                   GLuint* texcoords_vbo,
                   GLuint* normals_vbo,
+                  GLuint* time_vbo,
+                  GLuint* velocity_vbo,
                   GLuint* ubo,
                   GLuint* model_mat_idx_vbo) {
@@ -2128,4 +2152,10 @@
    *normals_vbo = 0;
    glGenBuffers(1, normals_vbo);
+
+   *velocity_vbo = 0;
+   glGenBuffers(1, velocity_vbo);
+
+   *time_vbo = 0;
+   glGenBuffers(1, time_vbo);
 
    *ubo = 0;
@@ -2143,4 +2173,6 @@
                   GLuint texcoords_vbo,
                   GLuint normals_vbo,
+                  GLuint time_vbo,
+                  GLuint velocity_vbo,
                   GLuint ubo,
                   GLuint model_mat_idx_vbo) {
@@ -2168,13 +2200,5 @@
    bindUniformData(modelGroups[TYPE_EXPLOSION].attribs["model_mat"], value_ptr(model_mat));
 
-   GLuint velocity_vbo;
-   glGenBuffers(1, &velocity_vbo);
-
-   GLuint time_vbo;
-   glGenBuffers(1, &time_vbo);
-
-   glBindVertexArray(modelGroups[TYPE_EXPLOSION].vao);
-
-   // the glBufferData and glVertexAttribPointer need to stay here while the corresponding arrays
+   // the glBufferData calls need to stay here while the corresponding arrays
    // are local to this function. Once they're made part of the explosion object, I might be able
    // to move this code out of here
@@ -2182,9 +2206,7 @@
    glBindBuffer(GL_ARRAY_BUFFER, velocity_vbo);
    glBufferData(GL_ARRAY_BUFFER, sizeof(vv), vv, GL_STATIC_DRAW);
-   glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, NULL);
 
    glBindBuffer(GL_ARRAY_BUFFER, time_vbo);
    glBufferData(GL_ARRAY_BUFFER, sizeof(vt), vt, GL_STATIC_DRAW);
-   glVertexAttribPointer(1, 1, GL_FLOAT, GL_FALSE, 0, NULL);
 
    objExplosion = createExplosion();
