Index: graphics-pipeline_vulkan.hpp
===================================================================
--- graphics-pipeline_vulkan.hpp	(revision 3b84bb6c891e1769362c69b5318e9f5284376cdf)
+++ graphics-pipeline_vulkan.hpp	(revision 44f23af8016482279566b636d38266b620bec156)
@@ -41,4 +41,6 @@
 class GraphicsPipeline_Vulkan : public GraphicsPipeline {
    public:
+      string vertShaderFile, fragShaderFile;
+
       GraphicsPipeline_Vulkan();
 
@@ -116,4 +118,5 @@
       void resizeVertexBuffer(VkCommandPool commandPool, VkQueue graphicsQueue);
       void resizeIndexBuffer(VkCommandPool commandPool, VkQueue graphicsQueue);
+      void resizeStorageBufferSet(StorageBufferSet& set, VkCommandPool commandPool, VkQueue graphicsQueue);
 };
 
@@ -233,4 +236,7 @@
 template<class VertexType, class SSBOType>
 void GraphicsPipeline_Vulkan<VertexType, SSBOType>::createPipeline(string vertShaderFile, string fragShaderFile) {
+   this->vertShaderFile = vertShaderFile;
+   this->fragShaderFile = fragShaderFile;
+
    vector<char> vertShaderCode = readFile(vertShaderFile);
    vector<char> fragShaderCode = readFile(fragShaderFile);
@@ -492,12 +498,11 @@
       resizeVertexBuffer(commandPool, graphicsQueue);
    }
-   if (numIndices + indices.size() > indexCapacity) {
-      resizeIndexBuffer(commandPool, graphicsQueue);
-   }
-
    VulkanUtils::copyDataToBuffer(device, physicalDevice, commandPool, vertices, vertexBuffer, numVertices,
       graphicsQueue);
    numVertices += vertices.size();
 
+   if (numIndices + indices.size() > indexCapacity) {
+      resizeIndexBuffer(commandPool, graphicsQueue);
+   }
    VulkanUtils::copyDataToBuffer(device, physicalDevice, commandPool, indices, indexBuffer, numIndices,
       graphicsQueue);
@@ -505,4 +510,26 @@
 
    bool resizedStorageBuffer = false;
+
+   if (!is_same_v<SSBOType, void*>) {
+      if (this->numObjects == this->objectCapacity) {
+         resizeStorageBufferSet(storageBufferSet, commandPool, graphicsQueue);
+         cleanup();
+
+         // Assume the SSBO is always the 2nd binding
+         this->descriptorInfoList[1].bufferDataList = &storageBufferSet.infoSet;
+         resizedStorageBuffer = true;
+
+         cout << "SSBO resized, New object capacity: " << this->objectCapacity << endl;
+
+         // TODO: I'll need to correctly update the descriptor set array instead of appending to it
+         // Then, I'll have to call createDescriptorSets() and finally createCommandBuffers() (from vulkan-game)
+         // This isn't too bad actually, since I have to call createCommandBuffers() every time I add a newobject
+         // anyway. So, in this function, I'll just have to call createDescriptorSets()
+      }
+
+      updateObject(this->numObjects, ssbo);
+   }
+
+   this->numObjects++;
 
    return resizedStorageBuffer;
@@ -621,3 +648,33 @@
 }
 
+template<class VertexType, class SSBOType>
+void GraphicsPipeline_Vulkan<VertexType, SSBOType>::resizeStorageBufferSet(StorageBufferSet& set,
+      VkCommandPool commandPool, VkQueue graphicsQueue) {
+   this->objectCapacity *= 2;
+   VkDeviceSize bufferSize = objectCapacity * sizeof(SSBOType);
+
+   for (size_t i = 0; i < set.buffers.size(); i++) {
+      VkBuffer newStorageBuffer;
+      VkDeviceMemory newStorageBufferMemory;
+
+      VulkanUtils::createBuffer(this->device, this->physicalDevice, bufferSize,
+         VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
+         VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
+         newStorageBuffer, newStorageBufferMemory);
+
+      VulkanUtils::copyBuffer(this->device, commandPool, set.buffers[i], newStorageBuffer,
+         0, 0, this->numObjects * sizeof(SSBOType), graphicsQueue);
+
+      vkDestroyBuffer(this->device, set.buffers[i], nullptr);
+      vkFreeMemory(this->device, set.memory[i], nullptr);
+
+      set.buffers[i] = newStorageBuffer;
+      set.memory[i] = newStorageBufferMemory;
+
+      set.infoSet[i].buffer = set.buffers[i];
+      set.infoSet[i].offset = 0; // This is the offset from the start of the buffer, so always 0 for now
+      set.infoSet[i].range = bufferSize; // Size of the update starting from offset, or VK_WHOLE_SIZE
+   }
+}
+
 #endif // _GRAPHICS_PIPELINE_VULKAN_H
Index: vulkan-game.cpp
===================================================================
--- vulkan-game.cpp	(revision 3b84bb6c891e1769362c69b5318e9f5284376cdf)
+++ vulkan-game.cpp	(revision 44f23af8016482279566b636d38266b620bec156)
@@ -742,4 +742,12 @@
       if (gui->keyPressed(SDL_SCANCODE_X)) {
          if (asteroidObjects.size() > 0 && !asteroidObjects[0].ssbo.deleted) {
+            asteroidObjects[0].model_transform = translate(mat4(1.0f), vec3(0.0f, 0.0f, asteroidSpeed * elapsedTime))
+               * asteroidObjects[0].model_transform;
+
+            vec3 obj_center = vec3(asteroid_VP_mats.view * vec4(asteroidObjects[0].center, 1.0f));
+
+            float closest = obj_center.z - asteroidObjects[0].radius;
+            cout << closest << " ? " << -NEAR_CLIP << endl;
+
             updateObject(asteroidObjects, asteroidPipeline, 0);
          }
Index: vulkan-game.hpp
===================================================================
--- vulkan-game.hpp	(revision 3b84bb6c891e1769362c69b5318e9f5284376cdf)
+++ vulkan-game.hpp	(revision 44f23af8016482279566b636d38266b620bec156)
@@ -269,5 +269,15 @@
 
    if (pipelinesCreated) {
+      vkDeviceWaitIdle(device);
+      vkFreeCommandBuffers(device, commandPool, static_cast<uint32_t>(commandBuffers.size()), commandBuffers.data());
+
+      // TODO: The pipeline recreation only has to be done once per frame where at least
+      // one SSBO is resized.
+      // Refactor the logic to check for any resized SSBOs after all objects for the frame
+      // are created and then recreate each of the corresponding pipelines only once per frame
       if (storageBufferResized) {
+         pipeline.createPipeline(pipeline.vertShaderFile, pipeline.fragShaderFile);
+         pipeline.createDescriptorPool(swapChainImages);
+         pipeline.createDescriptorSets(swapChainImages);
       }
 
