Index: vulkan-game.hpp
===================================================================
--- vulkan-game.hpp	(revision 7865c5b0ff6fd16268522aa00c64569b2fd54092)
+++ vulkan-game.hpp	(revision 5081b9a818ca07c114b3f94c82df8bc279787da6)
@@ -34,4 +34,7 @@
    const bool ENABLE_VALIDATION_LAYERS = true;
 #endif
+
+// TODO: Consider if there is a better way of dealing with all the vertex types and ssbo types, maybe
+// by consolidating some and trying to keep new ones to a minimum
 
 struct OverlayVertex {
@@ -193,4 +196,6 @@
 };
 
+// TODO: Maybe move this to a different header
+
 enum UIValueType {
    UIVALUE_INT,
@@ -208,4 +213,5 @@
 class VulkanGame {
    public:
+
       VulkanGame();
       ~VulkanGame();
@@ -213,11 +219,6 @@
       void run(int width, int height, unsigned char guiFlags);
 
-      GraphicsPipeline_Vulkan<ModelVertex, SSBO_ModelObject> modelPipeline;
-      GraphicsPipeline_Vulkan<ShipVertex, SSBO_ModelObject> shipPipeline;
-      GraphicsPipeline_Vulkan<AsteroidVertex, SSBO_Asteroid> asteroidPipeline;
-      GraphicsPipeline_Vulkan<LaserVertex, SSBO_Laser> laserPipeline;
-      GraphicsPipeline_Vulkan<ExplosionVertex, SSBO_Explosion> explosionPipeline;
-
    private:
+
       static VKAPI_ATTR VkBool32 VKAPI_CALL debugCallback(
          VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
@@ -226,7 +227,8 @@
          void* pUserData);
 
+      // TODO: Maybe pass these in as parameters to some Camera class
       const float NEAR_CLIP = 0.1f;
       const float FAR_CLIP = 100.0f;
-      const float FOV_ANGLE = 67.0f; // means the camera lens goes from -33 deg to 33 def
+      const float FOV_ANGLE = 67.0f; // means the camera lens goes from -33 deg to 33 deg
 
       const int EXPLOSION_PARTICLE_COUNT = 300;
@@ -286,6 +288,4 @@
       bool shouldRecreateSwapChain;
 
-      VkDescriptorPool imguiDescriptorPool;
-
       VkSampler textureSampler;
 
@@ -297,4 +297,18 @@
 
       mat4 viewMat, projMat;
+
+      // Maybe at some point create an imgui pipeline class, but I don't think it makes sense right now
+      VkDescriptorPool imguiDescriptorPool;
+
+      // TODO: Probably restructure the GraphicsPipeline_Vulkan class based on what I learned about descriptors and textures
+      // while working on graphics-library. Double-check exactly what this was and note it down here.
+      // Basically, I think the point was that if I have several modesl that all use the same shaders and, therefore,
+      // the same pipeline, but use different textures, the approach I took when initially creating GraphicsPipeline_Vulkan
+      // wouldn't work since the whole pipeline couldn't have a common set of descriptors for the textures
+      GraphicsPipeline_Vulkan<ModelVertex, SSBO_ModelObject> modelPipeline;
+      GraphicsPipeline_Vulkan<ShipVertex, SSBO_ModelObject> shipPipeline;
+      GraphicsPipeline_Vulkan<AsteroidVertex, SSBO_Asteroid> asteroidPipeline;
+      GraphicsPipeline_Vulkan<LaserVertex, SSBO_Laser> laserPipeline;
+      GraphicsPipeline_Vulkan<ExplosionVertex, SSBO_Explosion> explosionPipeline;
 
       // TODO: Maybe make the ubo objects part of the pipeline class since there's only one ubo
@@ -371,5 +385,4 @@
 
       // TODO: Make a separate TImer class
-      // It could also deal with the steady_clock vs high_resolution_clock issue
       time_point<steady_clock> startTime;
       float fpsStartTime, curTime, prevTime, elapsedTime;
@@ -398,9 +411,9 @@
       void createSwapChain();
       void createImageViews();
+      void createResourceCommandPool();
+      void createImageResources();
+      VkFormat findDepthFormat(); // TODO: Declare/define (in the cpp file) this function in some util functions section
       void createRenderPass();
-      VkFormat findDepthFormat(); // TODO: Declare/define (in the cpp file) this function in some util functions section
-      void createResourceCommandPool();
       void createCommandPools();
-      void createImageResources();
       void createFramebuffers();
       void createCommandBuffers();
@@ -409,6 +422,10 @@
       void createTextureSampler();
 
-      void createImguiDescriptorPool();
-      void destroyImguiDescriptorPool();
+      void initImGuiOverlay();
+      void cleanupImGuiOverlay();
+
+      void createBufferSet(VkDeviceSize bufferSize, VkBufferUsageFlags flags,
+         vector<VkBuffer>& buffers, vector<VkDeviceMemory>& buffersMemory,
+         vector<VkDescriptorBufferInfo>& bufferInfoList);
 
       // TODO: Since addObject() returns a reference to the new object now,
@@ -421,4 +438,13 @@
             bool pipelinesCreated);
 
+      template<class VertexType>
+      vector<VertexType> addObjectIndex(unsigned int objIndex, vector<VertexType> vertices);
+
+      template<class VertexType>
+      vector<VertexType> addVertexNormals(vector<VertexType> vertices);
+
+      template<class VertexType, class SSBOType>
+      void centerObject(SceneObject<VertexType, SSBOType>& object);
+
       template<class VertexType, class SSBOType>
       void updateObject(vector<SceneObject<VertexType, SSBOType>>& objects,
@@ -428,13 +454,4 @@
       void updateObjectVertices(GraphicsPipeline_Vulkan<VertexType, SSBOType>& pipeline,
             SceneObject<VertexType, SSBOType>& obj, size_t index);
-
-      template<class VertexType>
-      vector<VertexType> addVertexNormals(vector<VertexType> vertices);
-
-      template<class VertexType>
-      vector<VertexType> addObjectIndex(unsigned int objIndex, vector<VertexType> vertices);
-
-      template<class VertexType, class SSBOType>
-      void centerObject(SceneObject<VertexType, SSBOType>& object);
 
       void addLaser(vec3 start, vec3 end, vec3 color, float width);
@@ -445,8 +462,4 @@
 
       void addExplosion(mat4 model_mat, float duration, float cur_time);
-
-      void createBufferSet(VkDeviceSize bufferSize, VkBufferUsageFlags flags,
-            vector<VkBuffer>& buffers, vector<VkDeviceMemory>& buffersMemory,
-            vector<VkDescriptorBufferInfo>& bufferInfoList);
 
       void renderFrame(ImDrawData* draw_data);
@@ -503,4 +516,7 @@
    SceneObject<VertexType, SSBOType>& obj = objects.back();
 
+   // TODO: Specify whether to center the object outside of this function or, worst case, maybe
+   // with a boolean being passed in here, so that I don't have to rely on checking the specific object
+   // type
    if (!is_same_v<VertexType, LaserVertex> && !is_same_v<VertexType, ExplosionVertex>) {
       centerObject(obj);
@@ -533,22 +549,11 @@
 }
 
-// TODO: Just pass in the single object instead of a list of all of them
-template<class VertexType, class SSBOType>
-void VulkanGame::updateObject(vector<SceneObject<VertexType, SSBOType>>& objects,
-      GraphicsPipeline_Vulkan<VertexType, SSBOType>& pipeline, size_t index) {
-   SceneObject<VertexType, SSBOType>& obj = objects[index];
-
-   obj.ssbo.model = obj.model_transform * obj.model_base;
-   obj.center = vec3(obj.ssbo.model * vec4(0.0f, 0.0f, 0.0f, 1.0f));
-
-   pipeline.updateObject(index, obj.ssbo);
-
-   obj.modified = false;
-}
-
-template<class VertexType, class SSBOType>
-void VulkanGame::updateObjectVertices(GraphicsPipeline_Vulkan<VertexType, SSBOType>& pipeline,
-      SceneObject<VertexType, SSBOType>& obj, size_t index) {
-   pipeline.updateObjectVertices(index, obj.vertices, resourceCommandPool, graphicsQueue);
+template<class VertexType>
+vector<VertexType> VulkanGame::addObjectIndex(unsigned int objIndex, vector<VertexType> vertices) {
+   for (VertexType& vertex : vertices) {
+      vertex.objIndex = objIndex;
+   }
+
+   return vertices;
 }
 
@@ -557,6 +562,6 @@
    for (unsigned int i = 0; i < vertices.size(); i += 3) {
       vec3 p1 = vertices[i].pos;
-      vec3 p2 = vertices[i+1].pos;
-      vec3 p3 = vertices[i+2].pos;
+      vec3 p2 = vertices[i + 1].pos;
+      vec3 p3 = vertices[i + 2].pos;
 
       vec3 normal = normalize(cross(p2 - p1, p3 - p1));
@@ -564,15 +569,6 @@
       // Add the same normal for all 3 vertices
       vertices[i].normal = normal;
-      vertices[i+1].normal = normal;
-      vertices[i+2].normal = normal;
-   }
-
-   return vertices;
-}
-
-template<class VertexType>
-vector<VertexType> VulkanGame::addObjectIndex(unsigned int objIndex, vector<VertexType> vertices) {
-   for (VertexType& vertex : vertices) {
-      vertex.objIndex = objIndex;
+      vertices[i + 1].normal = normal;
+      vertices[i + 2].normal = normal;
    }
 
@@ -626,3 +622,23 @@
 }
 
+// TODO: Just pass in the single object instead of a list of all of them
+template<class VertexType, class SSBOType>
+void VulkanGame::updateObject(vector<SceneObject<VertexType, SSBOType>>& objects,
+      GraphicsPipeline_Vulkan<VertexType, SSBOType>& pipeline, size_t index) {
+   SceneObject<VertexType, SSBOType>& obj = objects[index];
+
+   obj.ssbo.model = obj.model_transform * obj.model_base;
+   obj.center = vec3(obj.ssbo.model * vec4(0.0f, 0.0f, 0.0f, 1.0f));
+
+   pipeline.updateObject(index, obj.ssbo);
+
+   obj.modified = false;
+}
+
+template<class VertexType, class SSBOType>
+void VulkanGame::updateObjectVertices(GraphicsPipeline_Vulkan<VertexType, SSBOType>& pipeline,
+      SceneObject<VertexType, SSBOType>& obj, size_t index) {
+   pipeline.updateObjectVertices(index, obj.vertices, resourceCommandPool, graphicsQueue);
+}
+
 #endif // _VULKAN_GAME_H
