Index: graphics-pipeline_vulkan.hpp
===================================================================
--- graphics-pipeline_vulkan.hpp	(revision 3b84bb6c891e1769362c69b5318e9f5284376cdf)
+++ graphics-pipeline_vulkan.hpp	(revision 0807aeb7700bc40b0b01bbd8a42ddd4065e0b699)
@@ -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
