Index: graphics-pipeline_vulkan.hpp
===================================================================
--- graphics-pipeline_vulkan.hpp	(revision d25381b88830bd62aa0ed8ef68e8641eff248736)
+++ graphics-pipeline_vulkan.hpp	(revision 860a0da7bda4763e3a1be95cfde80564e1cc9319)
@@ -5,4 +5,5 @@
 
 #include <fstream>
+#include <iostream>
 #include <stdexcept>
 #include <vector>
@@ -31,10 +32,21 @@
 };
 
+struct StorageBufferSet {
+   vector<VkBuffer> buffers;
+   vector<VkDeviceMemory> memory;
+   vector<VkDescriptorBufferInfo> infoSet;
+};
+
 template<class VertexType, class SSBOType>
 class GraphicsPipeline_Vulkan : public GraphicsPipeline {
    public:
       GraphicsPipeline_Vulkan();
+
+      // TODO: swapChainImages is only ever used to get its size. Check how that is determined and,
+      // if it will never change, just pass it in the constructor and save it
+      // If it does change, I could add an updateSwapchainImageCount() function
       GraphicsPipeline_Vulkan(VkPhysicalDevice physicalDevice, VkDevice device, VkRenderPass renderPass,
-         Viewport viewport, size_t vertexCapacity, size_t indexCapacity);
+         Viewport viewport, vector<VkImage>& swapChainImages,
+         size_t vertexCapacity, size_t indexCapacity, size_t objectCapacity);
       ~GraphicsPipeline_Vulkan();
 
@@ -46,4 +58,6 @@
 
       void addAttribute(VkFormat format, size_t offset);
+
+      void addStorageDescriptor();
 
       void addDescriptorInfo(VkDescriptorType type, VkShaderStageFlags stageFlags, vector<VkDescriptorBufferInfo>* bufferData);
@@ -62,4 +76,6 @@
       void cleanup();
       void cleanupBuffers();
+
+      StorageBufferSet storageBufferSet;
    
    private:
@@ -90,4 +106,7 @@
       VkDeviceMemory indexBufferMemory;
 
+      size_t numObjects;
+      size_t objectCapacity;
+
       VkShaderModule createShaderModule(const vector<char>& code);
       vector<char> readFile(const string& filename);
@@ -107,5 +126,6 @@
 GraphicsPipeline_Vulkan<VertexType, SSBOType>::GraphicsPipeline_Vulkan(
       VkPhysicalDevice physicalDevice, VkDevice device,
-      VkRenderPass renderPass, Viewport viewport, size_t vertexCapacity, size_t indexCapacity) {
+      VkRenderPass renderPass, Viewport viewport, vector<VkImage>& swapChainImages,
+      size_t vertexCapacity, size_t indexCapacity, size_t objectCapacity) {
    this->physicalDevice = physicalDevice;
    this->device = device;
@@ -133,6 +153,32 @@
       VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_INDEX_BUFFER_BIT,
       VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, indexBuffer, indexBufferMemory);
-}
-
+
+   this->numObjects = 0;
+   this->objectCapacity = objectCapacity;
+
+   // Hacky way to allow an SSBO to be optional
+   // Specifying void* as the SSBOType will skip allocating the related buffers
+   if (!is_same_v<SSBOType, void*>) {
+      VkDeviceSize bufferSize = objectCapacity * sizeof(SSBOType);
+      cout << "NUM SWAP CHAIN IMAGES: " << swapChainImages.size() << endl;
+
+      storageBufferSet.buffers.resize(swapChainImages.size());
+      storageBufferSet.memory.resize(swapChainImages.size());
+      storageBufferSet.infoSet.resize(swapChainImages.size());
+
+      for (size_t i = 0; i < swapChainImages.size(); i++) {
+         VulkanUtils::createBuffer(this->device, this->physicalDevice, bufferSize,
+            VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
+            VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
+            storageBufferSet.buffers[i], storageBufferSet.memory[i]);
+
+         storageBufferSet.infoSet[i].buffer = storageBufferSet.buffers[i];
+         storageBufferSet.infoSet[i].offset = 0; // This is the offset from the start of the buffer, so always 0 for now
+         storageBufferSet.infoSet[i].range = bufferSize; // Size of the update starting from offset, or VK_WHOLE_SIZE
+      }
+   }
+}
+
+// TODO: Move as much cleanup as I can into the destructor
 template<class VertexType, class SSBOType>
 GraphicsPipeline_Vulkan<VertexType, SSBOType>::~GraphicsPipeline_Vulkan() {
@@ -162,10 +208,20 @@
 
 template<class VertexType, class SSBOType>
-void GraphicsPipeline_Vulkan<VertexType, SSBOType>::addDescriptorInfo(VkDescriptorType type, VkShaderStageFlags stageFlags, vector<VkDescriptorBufferInfo>* bufferData) {
+void GraphicsPipeline_Vulkan<VertexType, SSBOType>::addStorageDescriptor() {
+   if (!is_same_v<SSBOType, void*>) {
+      addDescriptorInfo(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
+         VK_SHADER_STAGE_VERTEX_BIT, &storageBufferSet.infoSet);
+   }
+}
+
+template<class VertexType, class SSBOType>
+void GraphicsPipeline_Vulkan<VertexType, SSBOType>::addDescriptorInfo(VkDescriptorType type,
+      VkShaderStageFlags stageFlags, vector<VkDescriptorBufferInfo>* bufferData) {
    this->descriptorInfoList.push_back({ type, stageFlags, bufferData, nullptr });
 }
 
 template<class VertexType, class SSBOType>
-void GraphicsPipeline_Vulkan<VertexType, SSBOType>::addDescriptorInfo(VkDescriptorType type, VkShaderStageFlags stageFlags, VkDescriptorImageInfo* imageData) {
+void GraphicsPipeline_Vulkan<VertexType, SSBOType>::addDescriptorInfo(VkDescriptorType type,
+      VkShaderStageFlags stageFlags, VkDescriptorImageInfo* imageData) {
    this->descriptorInfoList.push_back({ type, stageFlags, nullptr, imageData });
 }
@@ -351,4 +407,5 @@
 }
 
+// TODO: Since I only need the size of the swapChainImages array, I should just pass that in instead of the whole array
 template<class VertexType, class SSBOType>
 void GraphicsPipeline_Vulkan<VertexType, SSBOType>::createDescriptorSets(vector<VkImage>& swapChainImages) {
@@ -398,5 +455,6 @@
 
 template<class VertexType, class SSBOType>
-void GraphicsPipeline_Vulkan<VertexType, SSBOType>::createRenderCommands(VkCommandBuffer& commandBuffer, uint32_t currentImage) {
+void GraphicsPipeline_Vulkan<VertexType, SSBOType>::createRenderCommands(VkCommandBuffer& commandBuffer,
+      uint32_t currentImage) {
    vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline);
    vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1,
@@ -436,4 +494,7 @@
    vkDestroyPipeline(device, pipeline, nullptr);
    vkDestroyDescriptorPool(device, descriptorPool, nullptr);
+
+   // TODO: I read that the pipeline layout does not have to be recreated every time
+   // Try only creating it once
    vkDestroyPipelineLayout(device, pipelineLayout, nullptr);
 }
@@ -447,4 +508,11 @@
    vkDestroyBuffer(device, indexBuffer, nullptr);
    vkFreeMemory(device, indexBufferMemory, nullptr);
+
+   if (!is_same_v<SSBOType, void*>) {
+      for (size_t i = 0; i < storageBufferSet.buffers.size(); i++) {
+         vkDestroyBuffer(device, storageBufferSet.buffers[i], nullptr);
+         vkFreeMemory(device, storageBufferSet.memory[i], nullptr);
+      }
+   }
 }
 
@@ -486,17 +554,18 @@
 
 template<class VertexType, class SSBOType>
-void GraphicsPipeline_Vulkan<VertexType, SSBOType>::resizeVertexBuffer(VkCommandPool commandPool, VkQueue graphicsQueue) {
+void GraphicsPipeline_Vulkan<VertexType, SSBOType>::resizeVertexBuffer(VkCommandPool commandPool,
+      VkQueue graphicsQueue) {
    VkBuffer newVertexBuffer;
    VkDeviceMemory newVertexBufferMemory;
-   vertexCapacity *= 2;
-
-   VulkanUtils::createBuffer(device, physicalDevice, vertexCapacity * sizeof(VertexType),
+   this->vertexCapacity *= 2;
+
+   VulkanUtils::createBuffer(this->device, this->physicalDevice, this->vertexCapacity * sizeof(VertexType),
       VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT,
       VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, newVertexBuffer, newVertexBufferMemory);
 
-   VulkanUtils::copyBuffer(device, commandPool, vertexBuffer, newVertexBuffer, 0, 0, numVertices * sizeof(VertexType), graphicsQueue);
-
-   vkDestroyBuffer(device, vertexBuffer, nullptr);
-   vkFreeMemory(device, vertexBufferMemory, nullptr);
+   VulkanUtils::copyBuffer(this->device, commandPool, vertexBuffer, newVertexBuffer, 0, 0, numVertices * sizeof(VertexType), graphicsQueue);
+
+   vkDestroyBuffer(this->device, vertexBuffer, nullptr);
+   vkFreeMemory(this->device, vertexBufferMemory, nullptr);
 
    vertexBuffer = newVertexBuffer;
@@ -505,17 +574,18 @@
 
 template<class VertexType, class SSBOType>
-void GraphicsPipeline_Vulkan<VertexType, SSBOType>::resizeIndexBuffer(VkCommandPool commandPool, VkQueue graphicsQueue) {
+void GraphicsPipeline_Vulkan<VertexType, SSBOType>::resizeIndexBuffer(VkCommandPool commandPool,
+      VkQueue graphicsQueue) {
    VkBuffer newIndexBuffer;
    VkDeviceMemory newIndexBufferMemory;
-   indexCapacity *= 2;
-
-   VulkanUtils::createBuffer(device, physicalDevice, indexCapacity * sizeof(uint16_t),
+   this->indexCapacity *= 2;
+
+   VulkanUtils::createBuffer(this->device, this->physicalDevice, this->indexCapacity * sizeof(uint16_t),
       VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_INDEX_BUFFER_BIT,
       VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, newIndexBuffer, newIndexBufferMemory);
 
-   VulkanUtils::copyBuffer(device, commandPool, indexBuffer, newIndexBuffer, 0, 0, numIndices * sizeof(uint16_t), graphicsQueue);
-
-   vkDestroyBuffer(device, indexBuffer, nullptr);
-   vkFreeMemory(device, indexBufferMemory, nullptr);
+   VulkanUtils::copyBuffer(this->device, commandPool, indexBuffer, newIndexBuffer, 0, 0, numIndices * sizeof(uint16_t), graphicsQueue);
+
+   vkDestroyBuffer(this->device, indexBuffer, nullptr);
+   vkFreeMemory(this->device, indexBufferMemory, nullptr);
 
    indexBuffer = newIndexBuffer;
Index: vulkan-game.cpp
===================================================================
--- vulkan-game.cpp	(revision d25381b88830bd62aa0ed8ef68e8641eff248736)
+++ vulkan-game.cpp	(revision 860a0da7bda4763e3a1be95cfde80564e1cc9319)
@@ -194,4 +194,25 @@
    initGraphicsPipelines();
 
+   overlayPipeline.addAttribute(VK_FORMAT_R32G32B32_SFLOAT, offset_of(&OverlayVertex::pos));
+   overlayPipeline.addAttribute(VK_FORMAT_R32G32_SFLOAT, offset_of(&OverlayVertex::texCoord));
+
+   overlayPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
+      VK_SHADER_STAGE_FRAGMENT_BIT, &sdlOverlayImageDescriptor);
+
+   addObject(overlayObjects, overlayPipeline,
+      {
+         {{-1.0f,  1.0f,  0.0f}, {0.0f, 1.0f}},
+         {{ 1.0f,  1.0f,  0.0f}, {1.0f, 1.0f}},
+         {{ 1.0f, -1.0f,  0.0f}, {1.0f, 0.0f}},
+         {{-1.0f, -1.0f,  0.0f}, {0.0f, 0.0f}}
+      }, {
+         0, 1, 2, 2, 3, 0
+      }, {});
+
+   overlayPipeline.createDescriptorSetLayout();
+   overlayPipeline.createPipeline("shaders/overlay-vert.spv", "shaders/overlay-frag.spv");
+   overlayPipeline.createDescriptorPool(swapChainImages);
+   overlayPipeline.createDescriptorSets(swapChainImages);
+
    modelPipeline.addAttribute(VK_FORMAT_R32G32B32_SFLOAT, offset_of(&ModelVertex::pos));
    modelPipeline.addAttribute(VK_FORMAT_R32G32B32_SFLOAT, offset_of(&ModelVertex::color));
@@ -201,12 +222,8 @@
    createBufferSet(sizeof(UBO_VP_mats), VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
       uniformBuffers_modelPipeline, uniformBuffersMemory_modelPipeline, uniformBufferInfoList_modelPipeline);
-   // TODO: Calculate the size of this buffer (and all the other SSBOs) based on the number of objects
-   createBufferSet(10 * sizeof(SSBO_ModelObject), VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
-      storageBuffers_modelPipeline, storageBuffersMemory_modelPipeline, storageBufferInfoList_modelPipeline);
 
    modelPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
       VK_SHADER_STAGE_VERTEX_BIT, &uniformBufferInfoList_modelPipeline);
-   modelPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
-      VK_SHADER_STAGE_VERTEX_BIT, &storageBufferInfoList_modelPipeline);
+   modelPipeline.addStorageDescriptor();
 
    modelPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
@@ -242,25 +259,4 @@
    modelPipeline.createDescriptorSets(swapChainImages);
 
-   overlayPipeline.addAttribute(VK_FORMAT_R32G32B32_SFLOAT, offset_of(&OverlayVertex::pos));
-   overlayPipeline.addAttribute(VK_FORMAT_R32G32_SFLOAT, offset_of(&OverlayVertex::texCoord));
-
-   overlayPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
-      VK_SHADER_STAGE_FRAGMENT_BIT, &sdlOverlayImageDescriptor);
-
-   addObject(overlayObjects, overlayPipeline,
-      {
-         {{-1.0f,  1.0f,  0.0f}, {0.0f, 1.0f}},
-         {{ 1.0f,  1.0f,  0.0f}, {1.0f, 1.0f}},
-         {{ 1.0f, -1.0f,  0.0f}, {1.0f, 0.0f}},
-         {{-1.0f, -1.0f,  0.0f}, {0.0f, 0.0f}}
-      }, {
-         0, 1, 2, 2, 3, 0
-      }, {});
-
-   overlayPipeline.createDescriptorSetLayout();
-   overlayPipeline.createPipeline("shaders/overlay-vert.spv", "shaders/overlay-frag.spv");
-   overlayPipeline.createDescriptorPool(swapChainImages);
-   overlayPipeline.createDescriptorSets(swapChainImages);
-
    shipPipeline.addAttribute(VK_FORMAT_R32G32B32_SFLOAT, offset_of(&ShipVertex::pos));
    shipPipeline.addAttribute(VK_FORMAT_R32G32B32_SFLOAT, offset_of(&ShipVertex::color));
@@ -270,11 +266,8 @@
    createBufferSet(sizeof(UBO_VP_mats), VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
       uniformBuffers_shipPipeline, uniformBuffersMemory_shipPipeline, uniformBufferInfoList_shipPipeline);
-   createBufferSet(10 * sizeof(SSBO_ModelObject), VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
-      storageBuffers_shipPipeline, storageBuffersMemory_shipPipeline, storageBufferInfoList_shipPipeline);
 
    shipPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
       VK_SHADER_STAGE_VERTEX_BIT, &uniformBufferInfoList_shipPipeline);
-   shipPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
-      VK_SHADER_STAGE_VERTEX_BIT, &storageBufferInfoList_shipPipeline);
+   shipPipeline.addStorageDescriptor();
 
    // TODO: With the normals, indexing basically becomes pointless since no vertices will have exactly
@@ -526,11 +519,8 @@
    createBufferSet(sizeof(UBO_VP_mats), VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
       uniformBuffers_asteroidPipeline, uniformBuffersMemory_asteroidPipeline, uniformBufferInfoList_asteroidPipeline);
-   createBufferSet(10 * sizeof(SSBO_Asteroid), VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
-      storageBuffers_asteroidPipeline, storageBuffersMemory_asteroidPipeline, storageBufferInfoList_asteroidPipeline);
 
    asteroidPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
       VK_SHADER_STAGE_VERTEX_BIT, &uniformBufferInfoList_asteroidPipeline);
-   asteroidPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
-      VK_SHADER_STAGE_VERTEX_BIT, &storageBufferInfoList_asteroidPipeline);
+   asteroidPipeline.addStorageDescriptor();
 
    addObject(asteroidObjects, asteroidPipeline,
@@ -631,14 +621,14 @@
 void VulkanGame::initGraphicsPipelines() {
    overlayPipeline = GraphicsPipeline_Vulkan<OverlayVertex, void*>(physicalDevice, device, renderPass,
-      { 0, 0, (int)swapChainExtent.width, (int)swapChainExtent.height }, 4, 6);
+      { 0, 0, (int)swapChainExtent.width, (int)swapChainExtent.height }, swapChainImages, 4, 6, 0);
 
    modelPipeline = GraphicsPipeline_Vulkan<ModelVertex, SSBO_ModelObject>(physicalDevice, device, renderPass,
-      { 0, 0, (int)swapChainExtent.width, (int)swapChainExtent.height }, 16, 24);
+      { 0, 0, (int)swapChainExtent.width, (int)swapChainExtent.height }, swapChainImages, 16, 24, 10);
 
    shipPipeline = GraphicsPipeline_Vulkan<ShipVertex, SSBO_ModelObject>(physicalDevice, device, renderPass,
-      { 0, 0, (int)swapChainExtent.width, (int)swapChainExtent.height }, 138, 138);
+      { 0, 0, (int)swapChainExtent.width, (int)swapChainExtent.height }, swapChainImages, 138, 138, 10);
 
    asteroidPipeline = GraphicsPipeline_Vulkan<AsteroidVertex, SSBO_Asteroid>(physicalDevice, device, renderPass,
-      { 0, 0, (int)swapChainExtent.width, (int)swapChainExtent.height }, 24, 36);
+      { 0, 0, (int)swapChainExtent.width, (int)swapChainExtent.height }, swapChainImages, 24, 36, 10);
 }
 
@@ -790,5 +780,5 @@
 
    for (size_t i = 0; i < modelObjects.size(); i++) {
-      VulkanUtils::copyDataToMemory(device, storageBuffersMemory_modelPipeline[currentImage],
+      VulkanUtils::copyDataToMemory(device, modelPipeline.storageBufferSet.memory[currentImage],
          i, so_Object);
    }
@@ -796,9 +786,9 @@
    VulkanUtils::copyDataToMemory(device, uniformBuffersMemory_shipPipeline[currentImage], 0, ship_VP_mats);
 
-   VulkanUtils::copyDataToMemory(device, storageBuffersMemory_shipPipeline[currentImage], 0, so_Ship);
+   VulkanUtils::copyDataToMemory(device, shipPipeline.storageBufferSet.memory[currentImage], 0, so_Ship);
 
    VulkanUtils::copyDataToMemory(device, uniformBuffersMemory_asteroidPipeline[currentImage], 0, asteroid_VP_mats);
 
-   VulkanUtils::copyDataToMemory(device, storageBuffersMemory_asteroidPipeline[currentImage], 0, so_Asteroid);
+   VulkanUtils::copyDataToMemory(device, asteroidPipeline.storageBufferSet.memory[currentImage], 0, so_Asteroid);
 }
 
@@ -1461,6 +1451,4 @@
    createBufferSet(sizeof(UBO_VP_mats), VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
       uniformBuffers_modelPipeline, uniformBuffersMemory_modelPipeline, uniformBufferInfoList_modelPipeline);
-   createBufferSet(10 * sizeof(SSBO_ModelObject), VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
-      storageBuffers_modelPipeline, storageBuffersMemory_modelPipeline, storageBufferInfoList_modelPipeline);
 
    modelPipeline.updateRenderPass(renderPass);
@@ -1476,6 +1464,4 @@
    createBufferSet(sizeof(UBO_VP_mats), VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
       uniformBuffers_shipPipeline, uniformBuffersMemory_shipPipeline, uniformBufferInfoList_shipPipeline);
-   createBufferSet(10 * sizeof(SSBO_ModelObject), VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
-      storageBuffers_shipPipeline, storageBuffersMemory_shipPipeline, storageBufferInfoList_shipPipeline);
 
    shipPipeline.updateRenderPass(renderPass);
@@ -1486,6 +1472,4 @@
    createBufferSet(sizeof(UBO_VP_mats), VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
       uniformBuffers_asteroidPipeline, uniformBuffersMemory_asteroidPipeline, uniformBufferInfoList_asteroidPipeline);
-   createBufferSet(10 * sizeof(SSBO_Asteroid), VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
-      storageBuffers_asteroidPipeline, storageBuffersMemory_asteroidPipeline, storageBufferInfoList_asteroidPipeline);
 
    asteroidPipeline.updateRenderPass(renderPass);
@@ -1506,16 +1490,8 @@
    vkFreeCommandBuffers(device, commandPool, static_cast<uint32_t>(commandBuffers.size()), commandBuffers.data());
 
+   overlayPipeline.cleanup();
    modelPipeline.cleanup();
-   overlayPipeline.cleanup();
    shipPipeline.cleanup();
    asteroidPipeline.cleanup();
-
-   vkDestroyRenderPass(device, renderPass, nullptr);
-
-   for (VkImageView imageView : swapChainImageViews) {
-      vkDestroyImageView(device, imageView, nullptr);
-   }
-
-   vkDestroySwapchainKHR(device, swapChain, nullptr);
 
    for (size_t i = 0; i < uniformBuffers_modelPipeline.size(); i++) {
@@ -1524,9 +1500,4 @@
    }
 
-   for (size_t i = 0; i < storageBuffers_modelPipeline.size(); i++) {
-      vkDestroyBuffer(device, storageBuffers_modelPipeline[i], nullptr);
-      vkFreeMemory(device, storageBuffersMemory_modelPipeline[i], nullptr);
-   }
-
    for (size_t i = 0; i < uniformBuffers_shipPipeline.size(); i++) {
       vkDestroyBuffer(device, uniformBuffers_shipPipeline[i], nullptr);
@@ -1534,9 +1505,4 @@
    }
 
-   for (size_t i = 0; i < storageBuffers_shipPipeline.size(); i++) {
-      vkDestroyBuffer(device, storageBuffers_shipPipeline[i], nullptr);
-      vkFreeMemory(device, storageBuffersMemory_shipPipeline[i], nullptr);
-   }
-
    for (size_t i = 0; i < uniformBuffers_asteroidPipeline.size(); i++) {
       vkDestroyBuffer(device, uniformBuffers_asteroidPipeline[i], nullptr);
@@ -1544,7 +1510,10 @@
    }
 
-   for (size_t i = 0; i < storageBuffers_asteroidPipeline.size(); i++) {
-      vkDestroyBuffer(device, storageBuffers_asteroidPipeline[i], nullptr);
-      vkFreeMemory(device, storageBuffersMemory_asteroidPipeline[i], nullptr);
-   }
-}
+   vkDestroyRenderPass(device, renderPass, nullptr);
+
+   for (VkImageView imageView : swapChainImageViews) {
+      vkDestroyImageView(device, imageView, nullptr);
+   }
+
+   vkDestroySwapchainKHR(device, swapChain, nullptr);
+}
Index: vulkan-game.hpp
===================================================================
--- vulkan-game.hpp	(revision d25381b88830bd62aa0ed8ef68e8641eff248736)
+++ vulkan-game.hpp	(revision 860a0da7bda4763e3a1be95cfde80564e1cc9319)
@@ -142,11 +142,11 @@
       bool framebufferResized;
 
-      // TODO: I should probably rename the uniformBuffer* and storageBuffer*
-      // variables to better reflect the data they hold
-
-      // TODO: Create a struct that holds the buffers, memory, and info objects (Probably in VulkanUtils)
-
       GraphicsPipeline_Vulkan<OverlayVertex, void*> overlayPipeline;
       vector<SceneObject<OverlayVertex, void*>> overlayObjects;
+
+      // TODO: Maybe make the ubo objects part of the pipeline class since there's only one ubo
+      // per pipeline.
+      // Or maybe create a higher level wrapper around GraphicsPipeline_Vulkan to hold things like
+      // the objects vector, the ubo, and the ssbo
 
       GraphicsPipeline_Vulkan<ModelVertex, SSBO_ModelObject> modelPipeline;
@@ -157,8 +157,4 @@
       vector<VkDescriptorBufferInfo> uniformBufferInfoList_modelPipeline;
 
-      vector<VkBuffer> storageBuffers_modelPipeline;
-      vector<VkDeviceMemory> storageBuffersMemory_modelPipeline;
-      vector<VkDescriptorBufferInfo> storageBufferInfoList_modelPipeline;
-
       UBO_VP_mats object_VP_mats;
       SSBO_ModelObject so_Object;
@@ -171,8 +167,4 @@
       vector<VkDescriptorBufferInfo> uniformBufferInfoList_shipPipeline;
 
-      vector<VkBuffer> storageBuffers_shipPipeline;
-      vector<VkDeviceMemory> storageBuffersMemory_shipPipeline;
-      vector<VkDescriptorBufferInfo> storageBufferInfoList_shipPipeline;
-
       UBO_VP_mats ship_VP_mats;
       SSBO_ModelObject so_Ship;
@@ -184,8 +176,4 @@
       vector<VkDeviceMemory> uniformBuffersMemory_asteroidPipeline;
       vector<VkDescriptorBufferInfo> uniformBufferInfoList_asteroidPipeline;
-
-      vector<VkBuffer> storageBuffers_asteroidPipeline;
-      vector<VkDeviceMemory> storageBuffersMemory_asteroidPipeline;
-      vector<VkDescriptorBufferInfo> storageBufferInfoList_asteroidPipeline;
 
       UBO_VP_mats asteroid_VP_mats;
