Index: .gitignore
===================================================================
--- .gitignore	(revision 20e4c2b3628aa61e3a41469fcb866c3100801fe7)
+++ .gitignore	(revision 187b0f51c66b33a3dd0fd0ca7bd655e77b75364a)
@@ -2,4 +2,5 @@
 vulkanref
 openglgame
+sdlgame
 vulkangame
 
Index: compile.sh
===================================================================
--- compile.sh	(revision 20e4c2b3628aa61e3a41469fcb866c3100801fe7)
+++ compile.sh	(revision 187b0f51c66b33a3dd0fd0ca7bd655e77b75364a)
@@ -1,3 +1,5 @@
-# TODO: Maybe turn this into a target in the makefile
+# TODO: Figure out why calling this from a makefile gives an error about shopt not being found
+
+# This section is left here in case there's no easy way to get glslangValidator in the path on a Mac
 
 OS=$(uname)
@@ -6,9 +8,4 @@
    VULKAN_SDK_PATH=/Users/dportnoy15/Development/vulkan-sdk-macos-1.1.108.0/macOS
 fi
-if [ $OS = "Linux" ]; then
-   VULKAN_SDK_PATH=/home/dportnoy/Desktop/VulkanSDK/1.1.106.0/x86_64
-fi
-
-echo $VULKAN_SDK_PATH
 
 shopt -s nullglob
@@ -23,4 +20,4 @@
    fOut="$shaderName-$shaderType.spv"
 
-   $VULKAN_SDK_PATH/bin/glslangValidator -V $f -o $fOut
+   glslangValidator -V $f -o $fOut
 done
Index: makefile
===================================================================
--- makefile	(revision 20e4c2b3628aa61e3a41469fcb866c3100801fe7)
+++ makefile	(revision 187b0f51c66b33a3dd0fd0ca7bd655e77b75364a)
@@ -1,6 +1,7 @@
-# CFLAGS are compiler flags and LIBFLAGS could be renamed LINKER_FLAGS
+# CXX_FLAGS are C++ compiler flags and LIBFLAGS could be renamed LINKER_FLAGS
 OS = $(shell uname)
 CC = g++
-CFLAGS = -std=c++17 -Wall -pedantic -rdynamic
+#CXX_FLAGS = -std=c++17 -Wall -pedantic -g3 -rdynamic
+CXX_FLAGS = -std=c++17 -Wall -pedantic -O3
 # -rdynamic is to generate debug info for dynamic symbols on debian-based 
 # systems (tested on Linux Mint)
@@ -24,10 +25,8 @@
 
 openglref: new-game.cpp logger.cpp utils.cpp crash-logger.cpp IMGUI/imgui_impl_glfw.cpp IMGUI/imgui_impl_opengl3.cpp $(IMGUI_FILES)
-	$(CC) $^ $(DEP) $(CFLAGS) -o $@ -DGLEW_STATIC
+	$(CC) $^ $(DEP) $(CXX_FLAGS) -o $@ -DGLEW_STATIC
 
 openglgame: main-opengl.cpp opengl-game.cpp crash-logger.cpp logger.cpp game-gui-glfw.cpp graphics-pipeline_opengl.cpp IMGUI/imgui_impl_glfw.cpp IMGUI/imgui_impl_opengl3.cpp $(IMGUI_FILES)
-	$(CC) $^ $(DEP) $(CFLAGS) -o $@ -DGLEW_STATIC
-
-CXX_FLAGS = -std=c++17 -Wall -pedantic# -O3 -rdynamic
+	$(CC) $^ $(DEP) $(CXX_FLAGS) -o $@ -DGLEW_STATIC
 
 ifeq ($(OS),Darwin)
@@ -46,11 +45,12 @@
 endif
 
-LIBS = `pkg-config --static --libs sdl2 sdl2_image sdl2_ttf sdl2_gfx`
+LIBS = `pkg-config --static --libs sdl2 sdl2_image sdl2_ttf`
 ifeq ($(OS),Darwin)
 	LIBS := $(VULKAN_SDK_PATH)/lib/libvulkan.dylib $(LIBS)
 endif
 ifeq ($(OS),Linux)
-	LIBS = `pkg-config --static --libs sdl2`
-	LIBS := -lvulkan $(LIBS) -lSDL2_image -lSDL2_ttf -lSDL2_gfx # TODO: figure out how to statically link these, ideally using pkg-config
+	#LIBS = `pkg-config --static --libs sdl2`
+	LIBS = 
+	LIBS := -lvulkan $(LIBS) -lSDL2 -lSDL2_image -lSDL2_ttf # TODO: figure out how to statically link these, ideally using pkg-config
 endif
 
@@ -63,12 +63,12 @@
 GUI_HEADER_FILES = gui/screen.hpp gui/main-screen.hpp gui/game-screen.hpp gui/ui-element.hpp gui/button.hpp gui/panel.hpp gui/ui-value.hpp
 
-SRC_FILES = main-vulkan.cpp vulkan-game.cpp crash-logger.cpp logger.cpp vulkan-utils.cpp utils.cpp game-gui-sdl.cpp $(GUI_SRC_FILES)
-HEADER_FILES = vulkan-game.hpp crash-logger.hpp logger.hpp vulkan-utils.hpp utils.hpp game-gui-sdl.hpp game-gui.hpp graphics-pipeline_vulkan.hpp $(GUI_HEADER_FILES)
+vulkangame: SRC_FILES = main-vulkan.cpp vulkan-game.cpp crash-logger.cpp logger.cpp vulkan-utils.cpp utils.cpp game-gui-sdl.cpp IMGUI/imgui_impl_sdl.cpp IMGUI/imgui_impl_vulkan.cpp $(IMGUI_FILES)
+vulkangame: HEADER_FILES = vulkan-game.hpp crash-logger.hpp logger.hpp vulkan-utils.hpp utils.hpp game-gui-sdl.hpp game-gui.hpp graphics-pipeline_vulkan.hpp IMGUI/imgui_impl_sdl.h IMGUI/imgui_impl_vulkan.h
 
 vulkangame: $(SRC_FILES) $(HEADER_FILES)
 	$(CC) $(CXX_FLAGS) -o $@ $(SRC_FILES) $(LIB_FLAGS) -DGAMEGUI_INCLUDE_VULKAN
 
-SRC_FILES = main-vulkan.cpp sdl-game.cpp crash-logger.cpp logger.cpp vulkan-utils.cpp game-gui-sdl.cpp IMGUI/imgui_impl_sdl.cpp IMGUI/imgui_impl_vulkan.cpp $(IMGUI_FILES)
-HEADER_FILES = sdl-game.hpp crash-logger.hpp logger.hpp vulkan-utils.hpp game-gui.hpp game-gui-sdl.hpp IMGUI/imgui_impl_sdl.h IMGUI/imgui_impl_vulkan.h
+sdlgame: SRC_FILES = main-vulkan.cpp sdl-game.cpp crash-logger.cpp logger.cpp vulkan-utils.cpp game-gui-sdl.cpp IMGUI/imgui_impl_sdl.cpp IMGUI/imgui_impl_vulkan.cpp $(IMGUI_FILES)
+sdlgame: HEADER_FILES = sdl-game.hpp crash-logger.hpp logger.hpp vulkan-utils.hpp game-gui.hpp game-gui-sdl.hpp IMGUI/imgui_impl_sdl.h IMGUI/imgui_impl_vulkan.h
 
 sdlgame: $(SRC_FILES) $(HEADER_FILES)
Index: sdl-game.cpp
===================================================================
--- sdl-game.cpp	(revision 20e4c2b3628aa61e3a41469fcb866c3100801fe7)
+++ sdl-game.cpp	(revision 187b0f51c66b33a3dd0fd0ca7bd655e77b75364a)
@@ -49,5 +49,6 @@
    swapChainPresentMode = VK_PRESENT_MODE_MAX_ENUM_KHR;
    swapChainMinImageCount = 0;
-
+   currentFrame = 0;
+   imageIndex = 0;
    shouldRecreateSwapChain = false;
 
@@ -254,6 +255,6 @@
 
 void VulkanGame::renderLoop() {
-   startTime = high_resolution_clock::now();
-   curTime = duration<float, seconds::period>(high_resolution_clock::now() - startTime).count();
+   startTime = steady_clock::now();
+   curTime = duration<float, seconds::period>(steady_clock::now() - startTime).count();
 
    fpsStartTime = curTime;
@@ -265,5 +266,5 @@
    while (!done) {
 
-      curTime = duration<float, seconds::period>(high_resolution_clock::now() - startTime).count();
+      curTime = duration<float, seconds::period>(steady_clock::now() - startTime).count();
 
       if (curTime - fpsStartTime >= 1.0f) {
@@ -333,5 +334,4 @@
             recreateSwapChain();
 
-            imageIndex = 0;
             shouldRecreateSwapChain = false;
          }
@@ -496,4 +496,12 @@
 
    cout << "Device: " << deviceProperties.deviceName << endl;
+
+   // TODO: Eventually, maybe let the user pick out of a set of GPUs in case the user does want to use
+   // an integrated GPU. On my laptop, this function returns TRUE for the integrated GPU, but crashes
+   // when trying to use it to render. Maybe I just need to figure out which other extensions and features
+   // to check.
+   if (deviceProperties.deviceType != VkPhysicalDeviceType::VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU) {
+      return false;
+   }
 
    QueueFamilyIndices indices = VulkanUtils::findQueueFamilies(physicalDevice, surface);
@@ -970,4 +978,6 @@
 
    createSyncObjects();
+
+   imageIndex = 0;
 }
 
Index: vulkan-game.cpp
===================================================================
--- vulkan-game.cpp	(revision 20e4c2b3628aa61e3a41469fcb866c3100801fe7)
+++ vulkan-game.cpp	(revision 187b0f51c66b33a3dd0fd0ca7bd655e77b75364a)
@@ -59,6 +59,6 @@
    swapChainPresentMode = VK_PRESENT_MODE_MAX_ENUM_KHR;
    swapChainMinImageCount = 0;
-
    currentFrame = 0;
+   imageIndex = 0;
    shouldRecreateSwapChain = false;
 
@@ -706,6 +706,6 @@
 
 void VulkanGame::renderLoop() {
-   startTime = high_resolution_clock::now();
-   curTime = duration<float, seconds::period>(high_resolution_clock::now() - startTime).count();
+   startTime = steady_clock::now();
+   curTime = duration<float, seconds::period>(steady_clock::now() - startTime).count();
 
    fpsStartTime = curTime;
@@ -720,5 +720,5 @@
 
       this->prevTime = curTime;
-      curTime = duration<float, seconds::period>(high_resolution_clock::now() - this->startTime).count();
+      curTime = duration<float, seconds::period>(steady_clock::now() - this->startTime).count();
       this->elapsedTime = curTime - this->prevTime;
 
@@ -901,5 +901,4 @@
             recreateSwapChain();
 
-            imageIndex = 0;
             shouldRecreateSwapChain = false;
          }
@@ -1277,4 +1276,12 @@
 
    cout << "Device: " << deviceProperties.deviceName << endl;
+
+   // TODO: Eventually, maybe let the user pick out of a set of GPUs in case the user does want to use
+   // an integrated GPU. On my laptop, this function returns TRUE for the integrated GPU, but crashes
+   // when trying to use it to render. Maybe I just need to figure out which other extensions and features
+   // to check.
+   if (deviceProperties.deviceType != VkPhysicalDeviceType::VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU) {
+      return false;
+   }
 
    QueueFamilyIndices indices = VulkanUtils::findQueueFamilies(physicalDevice, surface);
Index: vulkan-game.hpp
===================================================================
--- vulkan-game.hpp	(revision 20e4c2b3628aa61e3a41469fcb866c3100801fe7)
+++ vulkan-game.hpp	(revision 187b0f51c66b33a3dd0fd0ca7bd655e77b75364a)
@@ -24,5 +24,4 @@
 #include "vulkan-utils.hpp"
 #include "graphics-pipeline_vulkan.hpp"
-
 #include "game-gui-sdl.hpp"
 
Index: vulkan-ref.cpp
===================================================================
--- vulkan-ref.cpp	(revision 20e4c2b3628aa61e3a41469fcb866c3100801fe7)
+++ vulkan-ref.cpp	(revision 187b0f51c66b33a3dd0fd0ca7bd655e77b75364a)
@@ -9,4 +9,6 @@
 #include <glm/glm.hpp>
 #include <glm/gtc/matrix_transform.hpp>
+
+#include <SDL2/SDL_ttf.h>
 
 #include <iostream>
