diff --git a/ConjureEngine/src/ConjureEngine/VulkanContext.cpp b/ConjureEngine/src/ConjureEngine/VulkanContext.cpp index 2ce5c34..f27cce7 100644 --- a/ConjureEngine/src/ConjureEngine/VulkanContext.cpp +++ b/ConjureEngine/src/ConjureEngine/VulkanContext.cpp @@ -100,9 +100,11 @@ namespace ConjureEngine { vkGetDeviceQueue(m_device, graphicsQueueIndex, 0, &m_graphicQueue); - #ifndef __APPLE__ // MAC DOESNT SUPPORT 2 QUEUES LIKE ON WINDOWS/ - vkGetDeviceQueue(m_device, presentQueueIndex, 0, &m_presentQueue); - #endif + // WHEN POSSIBLE, WE WANT TO USE THE PRESENTATION QUEUE, BUT MAC DOESN'T SUPPORT IT + if(presentQueueIndex != UINT32_MAX) { + m_supportsPresentationQueue = true; + vkGetDeviceQueue(m_device, presentQueueIndex, 0, &m_presentQueue); + } const std::string error = SDL_GetError(); diff --git a/ConjureEngine/src/ConjureEngine/VulkanContext.h b/ConjureEngine/src/ConjureEngine/VulkanContext.h index 24e5c86..f667312 100644 --- a/ConjureEngine/src/ConjureEngine/VulkanContext.h +++ b/ConjureEngine/src/ConjureEngine/VulkanContext.h @@ -26,8 +26,7 @@ namespace ConjureEngine { VkDeviceCreateInfo m_deviceCreateInfo{}; VkDevice m_device{nullptr}; VkQueue m_graphicQueue{nullptr}; - #ifndef __APPLE__ VkQueue m_presentQueue{nullptr}; - #endif + bool m_supportsPresentationQueue = false; }; } // ConjureEngine