CONGE-2 Tweaked the logic to handle cases where presentation queue is not available instead of using #ifndef

This commit is contained in:
Jimmy Tremblay-Bernier 2024-11-22 15:08:02 -05:00
parent d74d19fdf2
commit 194ea8eeef
2 changed files with 6 additions and 5 deletions

View File

@ -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();

View File

@ -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