Setup device and queue
This commit is contained in:
16
main.cpp
16
main.cpp
@@ -10,7 +10,7 @@ namespace PB::Renderer
|
||||
if (!GLFWManager::Cleanup())
|
||||
std::exit(EXIT_FAILURE);
|
||||
|
||||
if (VulkanManager::Cleanup())
|
||||
if (!VulkanManager::Cleanup())
|
||||
std::exit(EXIT_FAILURE);
|
||||
|
||||
std::exit(code);
|
||||
@@ -30,20 +30,8 @@ int main()
|
||||
return -1;
|
||||
|
||||
/* Runs Vulkan initialisation functions */
|
||||
if (const std::optional<VkInstance> instance = VulkanManager::Init(); !instance)
|
||||
{
|
||||
GLFWManager::Cleanup();
|
||||
}
|
||||
|
||||
if (const std::optional<VkSurfaceKHR> surface = VulkanManager::CreateSurface(window); !surface)
|
||||
{
|
||||
if (!VulkanManager::InitAll(window))
|
||||
CleanupAllAndExit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (!VulkanManager::PickPhysicalDevice())
|
||||
{
|
||||
CleanupAllAndExit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Polls window events whilst it is still open */
|
||||
while (!glfwWindowShouldClose(window))
|
||||
|
||||
Reference in New Issue
Block a user