CONGE-2 Tweaked the logic to handle cases where presentation queue is not available instead of using #ifndef
This commit is contained in:
parent
d74d19fdf2
commit
194ea8eeef
@ -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();
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user