Index: sdl-game.hpp
===================================================================
--- sdl-game.hpp	(revision 6493e439340a5e8c494580409ac38e03e31f7289)
+++ sdl-game.hpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -3,12 +3,11 @@
 
 #include <vector>
-
 #include <vulkan/vulkan.h>
 
 #include <SDL2/SDL.h>
-
 #include "IMGUI/imgui_impl_vulkan.h"
 
 #include "consts.hpp"
+#include "vulkan-utils.hpp"
 
 #include "game-gui-sdl.hpp"
@@ -26,8 +25,8 @@
 class VulkanGame {
    public:
-      VulkanGame(int maxFramesInFlight);
+      VulkanGame();
       ~VulkanGame();
 
-      void run(int width, int height, unsigned char guiFlags); // Mostly example code
+      void run(int width, int height, unsigned char guiFlags);
 
    private:
@@ -38,9 +37,4 @@
          void* pUserData);
 
-      // TODO: Make these consts static
-      // Also, maybe move them into consts.hpp
-
-      const int MAX_FRAMES_IN_FLIGHT; // Unused right now
-
       // TODO: Good place to start using smart pointers
       GameGui* gui;
@@ -49,10 +43,44 @@
       SDL_Window* window;
 
+      VkInstance instance;
       VkDebugUtilsMessengerEXT debugMessenger = VK_NULL_HANDLE;
       VkSurfaceKHR surface; // TODO: Change the variable name to vulkanSurface
+      VkPhysicalDevice physicalDevice = VK_NULL_HANDLE;
+      VkDevice device;
 
       VkQueue graphicsQueue;
       VkQueue presentQueue;
-      
+
+      // TODO: Maybe make a swapchain struct for convenience
+      VkSurfaceFormatKHR swapChainSurfaceFormat;
+      VkPresentModeKHR swapChainPresentMode;
+      VkExtent2D swapChainExtent;
+      uint32_t swapChainMinImageCount;
+      uint32_t swapChainImageCount;
+
+      VkSwapchainKHR swapChain;
+      vector<VkImage> swapChainImages;
+      vector<VkImageView> swapChainImageViews;
+      vector<VkFramebuffer> swapChainFramebuffers;
+
+      VkRenderPass renderPass;
+
+      VkCommandPool resourceCommandPool;
+
+      vector<VkCommandPool> commandPools;
+      vector<VkCommandBuffer> commandBuffers;
+
+      VulkanImage depthImage;
+
+      // These are per frame
+      vector<VkSemaphore> imageAcquiredSemaphores;
+      vector<VkSemaphore> renderCompleteSemaphores;
+
+      // These are per swap chain image
+      vector<VkFence> inFlightFences;
+
+      uint32_t imageIndex;
+      uint32_t currentFrame;
+
       // My code, but not complete. Skips creating the SDL renderer, probably because it doesn't use hardware acceleration.
       // I should try to get uncapped framerate and compare performance w/ and w/out an SDL renderer
@@ -65,24 +93,32 @@
       void populateDebugMessengerCreateInfo(VkDebugUtilsMessengerCreateInfoEXT& createInfo);
       void createVulkanSurface();
-      void pickPhysicalDevice(const vector<const char*>& deviceExtensions); // Double-check, but it should be a copy of my code. Still uses g_Instance and g_Physical device though
+      void pickPhysicalDevice(const vector<const char*>& deviceExtensions);
       bool isDeviceSuitable(VkPhysicalDevice physicalDevice, const vector<const char*>& deviceExtensions);
       void createLogicalDevice(const vector<const char*>& validationLayers,
-         const vector<const char*>& deviceExtensions); // Only creates the graphics queue. Later, checks that this queue also supports presenting, but this codebase does not seem to support a separate present queue
+         const vector<const char*>& deviceExtensions);
+      void chooseSwapChainProperties();
+      void createSwapChain();
+      void createImageViews();
+      void createRenderPass();
+      VkFormat findDepthFormat(); // TODO: Declare/define (in the cpp file) this function in some util functions section
+      void createResourceCommandPool();
+      void createCommandPools();
+      void createFramebuffers();
+      void createCommandBuffers();
+      void createSyncObjects();
+
+      void recreateSwapChain();
+
+      void cleanupSwapChain();
 
       // Pipeline variables. Hopefully, I can eventually use the GraphicsPipeline_Vulkan class for the imgui pipeline
       VkDescriptorPool descriptorPool;
 
+   // Helper methods from imgui_impl_vulkan that were moved into VulkanGame to give them access to class instance variables
+   public:
+      void FrameRender(ImDrawData* draw_data);
+      void FramePresent();
+
 };
 
-// These functions are helper functions that were used in the ImGui Vulkan+SDL example
-
-void ImGui_ImplVulkanH_CreateOrResizeWindow(VkInstance instance, VkPhysicalDevice physical_device, VkDevice device,
-   ImGui_ImplVulkanH_Window* wnd, uint32_t queue_family, const VkAllocationCallbacks* allocator, int w, int h,
-   uint32_t min_image_count);
-
-void ImGui_ImplVulkanH_CreateWindowSwapChain(VkPhysicalDevice physical_device, VkDevice device,
-   ImGui_ImplVulkanH_Window* wd, const VkAllocationCallbacks* allocator, int w, int h, uint32_t min_image_count);
-
-// End helper functions
-
 #endif // _SDL_GAME_H
