Index: new-game.cpp
===================================================================
--- new-game.cpp	(revision a9d191a7666a8569c85ce19eda91b79ff14cef4c)
+++ new-game.cpp	(revision 14e69189a4e5dee0b2265f9e757c5fd35432a31c)
@@ -556,20 +556,4 @@
    initModelGroupAttribs(modelGroups[TYPE_ASTEROID]);
 
-   glBindBuffer(GL_ARRAY_BUFFER, points_vbo);
-   glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, NULL);
-   modelGroups[TYPE_ASTEROID].attribs["vertex_position"].buffer = points_vbo;
-
-   glBindBuffer(GL_ARRAY_BUFFER, colors_vbo);
-   glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, NULL);
-   modelGroups[TYPE_ASTEROID].attribs["vertex_color"].buffer = colors_vbo;
-
-   glBindBuffer(GL_ARRAY_BUFFER, normals_vbo);
-   glVertexAttribPointer(2, 3, GL_FLOAT, GL_FALSE, 0, NULL);
-   modelGroups[TYPE_ASTEROID].attribs["vertex_normal"].buffer = normals_vbo;
-
-   glBindBuffer(GL_ARRAY_BUFFER, model_mat_idx_vbo);
-   glVertexAttribIPointer(3, 1, GL_UNSIGNED_INT, 0, NULL);
-   modelGroups[TYPE_ASTEROID].attribs["ubo_index"].buffer = model_mat_idx_vbo;
-
    modelGroups[TYPE_LASER] = createModelGroup(
       loadShaderProgram("./laser.vert", "./laser.frag"));
@@ -2295,4 +2279,20 @@
          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"];
@@ -2341,5 +2341,5 @@
    BufferInfo* bufferInfo = &shaderBufferInfo[modelGroups[obj.type].shaderProgram];
 
-   if (obj.type == TYPE_SHIP || obj.type == TYPE_LASER) {
+   if (obj.type == TYPE_SHIP || obj.type == TYPE_ASTEROID || obj.type == TYPE_LASER) {
       obj.vertex_vbo_offset = modelGroups[obj.type].numPoints;
    } else {
@@ -2564,5 +2564,5 @@
    glBindVertexArray(modelGroups[TYPE_ASTEROID].vao);
 
-   glDrawArrays(GL_TRIANGLES, shaderBufferInfo[modelGroups[TYPE_ASTEROID].shaderProgram].vbo_base, modelGroups[TYPE_ASTEROID].numPoints);
+   glDrawArrays(GL_TRIANGLES, 0, modelGroups[TYPE_ASTEROID].numPoints);
 
    glEnable(GL_BLEND);
