Better branching logic for Vulkan init

This commit is contained in:
Jack Andersen 2016-09-30 12:40:06 -10:00
parent 10988fa37e
commit 26b1e25077
1 changed files with 8 additions and 10 deletions

View File

@ -233,20 +233,18 @@ public:
{
#if BOO_HAS_VULKAN
/* Check for Vulkan presence and preference */
bool hasVk = loadVk();
if (hasVk)
{
bool tryVulkan = true;
for (const std::string& arg : args)
{
if (!arg.compare("--gl"))
{
dlclose(m_vkHandle);
m_vkHandle = nullptr;
m_getVkProc = 0;
tryVulkan = false;
break;
}
}
}
if (tryVulkan)
loadVk();
if (m_getVkProc)
Log.report(logvisor::Info, "using Vulkan renderer");