Index: sdl-game.cpp
===================================================================
--- sdl-game.cpp	(revision 85b5fecdb1b2b3249583a225657b9a52d23bc726)
+++ sdl-game.cpp	(revision aa7e5f02d65eda57e6410dbfc26d5ef3e252bcc6)
@@ -40,21 +40,35 @@
 }
 
-VulkanGame::VulkanGame() {
-   // TODO: Double-check whether initialization should happen in the header, where the variables are declared, or here
-   // Also, decide whether to use this-> for all instance variables, or only when necessary
-
-   debugMessenger = VK_NULL_HANDLE;
-
-   gui = nullptr;
-   window = nullptr;
-
-   swapChainPresentMode = VK_PRESENT_MODE_MAX_ENUM_KHR;
-   swapChainMinImageCount = 0;
-   currentFrame = 0;
-   imageIndex = 0;
-   shouldRecreateSwapChain = false;
-
-   score = 0;
-   fps = 0.0f;
+VulkanGame::VulkanGame()
+                     : swapChainImageCount(0)
+                     , swapChainMinImageCount(0)
+                     , swapChainSurfaceFormat({})
+                     , swapChainPresentMode(VK_PRESENT_MODE_MAX_ENUM_KHR)
+                     , swapChainExtent{ 0, 0 }
+                     , swapChain(VK_NULL_HANDLE)
+                     , vulkanSurface(VK_NULL_HANDLE)
+                     , sdlVersion({ 0, 0, 0 })
+                     , instance(VK_NULL_HANDLE)
+                     , physicalDevice(VK_NULL_HANDLE)
+                     , device(VK_NULL_HANDLE)
+                     , debugMessenger(VK_NULL_HANDLE)
+                     , resourceCommandPool(VK_NULL_HANDLE)
+                     , renderPass(VK_NULL_HANDLE)
+                     , graphicsQueue(VK_NULL_HANDLE)
+                     , presentQueue(VK_NULL_HANDLE)
+                     , depthImage({})
+                     , shouldRecreateSwapChain(false)
+                     , frameCount(0)
+                     , currentFrame()
+                     , imageIndex(0)
+                     , fpsStartTime(0.0f)
+                     , curTime(0.0f)
+                     , done(false)
+                     , currentRenderScreenFn(nullptr)
+                     , descriptorPool(VK_NULL_HANDLE)
+                     , gui(nullptr)
+                     , window(nullptr)
+                     , score(0)
+                     , fps(0.0f) {
 }
 
@@ -104,5 +118,5 @@
 
    // TODO: Do this in one place and save it instead of redoing it every time I need a queue family index
-   QueueFamilyIndices indices = VulkanUtils::findQueueFamilies(physicalDevice, surface);
+   QueueFamilyIndices indices = VulkanUtils::findQueueFamilies(physicalDevice, vulkanSurface);
 
    // Setup Dear ImGui context
@@ -376,5 +390,5 @@
 
    vkDestroyDevice(device, nullptr);
-   vkDestroySurfaceKHR(instance, surface, nullptr);
+   vkDestroySurfaceKHR(instance, vulkanSurface, nullptr);
 
    if (ENABLE_VALIDATION_LAYERS) {
@@ -461,5 +475,5 @@
 
 void VulkanGame::createVulkanSurface() {
-   if (gui->createVulkanSurface(instance, &surface) == RTWO_ERROR) {
+   if (gui->createVulkanSurface(instance, &vulkanSurface) == RTWO_ERROR) {
       throw runtime_error("failed to create window surface!");
    }
@@ -507,11 +521,11 @@
    }
 
-   QueueFamilyIndices indices = VulkanUtils::findQueueFamilies(physicalDevice, surface);
+   QueueFamilyIndices indices = VulkanUtils::findQueueFamilies(physicalDevice, vulkanSurface);
    bool extensionsSupported = VulkanUtils::checkDeviceExtensionSupport(physicalDevice, deviceExtensions);
    bool swapChainAdequate = false;
 
    if (extensionsSupported) {
-      vector<VkSurfaceFormatKHR> formats = VulkanUtils::querySwapChainFormats(physicalDevice, surface);
-      vector<VkPresentModeKHR> presentModes = VulkanUtils::querySwapChainPresentModes(physicalDevice, surface);
+      vector<VkSurfaceFormatKHR> formats = VulkanUtils::querySwapChainFormats(physicalDevice, vulkanSurface);
+      vector<VkPresentModeKHR> presentModes = VulkanUtils::querySwapChainPresentModes(physicalDevice, vulkanSurface);
 
       swapChainAdequate = !formats.empty() && !presentModes.empty();
@@ -526,5 +540,5 @@
 void VulkanGame::createLogicalDevice(const vector<const char*>& validationLayers,
    const vector<const char*>& deviceExtensions) {
-   QueueFamilyIndices indices = VulkanUtils::findQueueFamilies(physicalDevice, surface);
+   QueueFamilyIndices indices = VulkanUtils::findQueueFamilies(physicalDevice, vulkanSurface);
 
    if (!indices.isComplete()) {
@@ -582,6 +596,6 @@
 
 void VulkanGame::chooseSwapChainProperties() {
-   vector<VkSurfaceFormatKHR> availableFormats = VulkanUtils::querySwapChainFormats(physicalDevice, surface);
-   vector<VkPresentModeKHR> availablePresentModes = VulkanUtils::querySwapChainPresentModes(physicalDevice, surface);
+   vector<VkSurfaceFormatKHR> availableFormats = VulkanUtils::querySwapChainFormats(physicalDevice, vulkanSurface);
+   vector<VkPresentModeKHR> availablePresentModes = VulkanUtils::querySwapChainPresentModes(physicalDevice, vulkanSurface);
 
    // Per Spec Format and View Format are expected to be the same unless VK_IMAGE_CREATE_MUTABLE_BIT was set at image creation
@@ -605,5 +619,5 @@
    cout << "[vulkan] Selected PresentMode = " << swapChainPresentMode << endl;
 
-   VkSurfaceCapabilitiesKHR capabilities = VulkanUtils::querySwapChainCapabilities(physicalDevice, surface);
+   VkSurfaceCapabilitiesKHR capabilities = VulkanUtils::querySwapChainCapabilities(physicalDevice, vulkanSurface);
 
    // If min image count was not specified, request different count of images dependent on selected present mode
@@ -632,5 +646,5 @@
 
 void VulkanGame::createSwapChain() {
-   VkSurfaceCapabilitiesKHR capabilities = VulkanUtils::querySwapChainCapabilities(physicalDevice, surface);
+   VkSurfaceCapabilitiesKHR capabilities = VulkanUtils::querySwapChainCapabilities(physicalDevice, vulkanSurface);
 
    swapChainExtent = VulkanUtils::chooseSwapExtent(capabilities, gui->getWindowWidth(), gui->getWindowHeight());
@@ -638,5 +652,5 @@
    VkSwapchainCreateInfoKHR createInfo = {};
    createInfo.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR;
-   createInfo.surface = surface;
+   createInfo.surface = vulkanSurface;
    createInfo.minImageCount = swapChainMinImageCount;
    createInfo.imageFormat = swapChainSurfaceFormat.format;
@@ -647,5 +661,5 @@
 
    // TODO: Maybe save this result so I don't have to recalculate it every time
-   QueueFamilyIndices indices = VulkanUtils::findQueueFamilies(physicalDevice, surface);
+   QueueFamilyIndices indices = VulkanUtils::findQueueFamilies(physicalDevice, vulkanSurface);
    uint32_t queueFamilyIndices[] = { indices.graphicsFamily.value(), indices.presentFamily.value() };
 
@@ -762,5 +776,5 @@
 
 void VulkanGame::createResourceCommandPool() {
-   QueueFamilyIndices indices = VulkanUtils::findQueueFamilies(physicalDevice, surface);
+   QueueFamilyIndices indices = VulkanUtils::findQueueFamilies(physicalDevice, vulkanSurface);
 
    VkCommandPoolCreateInfo poolInfo = {};
@@ -777,5 +791,5 @@
    commandPools.resize(swapChainImageCount);
 
-   QueueFamilyIndices indices = VulkanUtils::findQueueFamilies(physicalDevice, surface);
+   QueueFamilyIndices indices = VulkanUtils::findQueueFamilies(physicalDevice, vulkanSurface);
 
    for (size_t i = 0; i < swapChainImageCount; i++) {
