Move Vulkan initialization out of example constructor to allow overriding initialization functins (e.g. instance creation)
This commit is contained in:
parent
fac6524564
commit
17e3313b53
2 changed files with 15 additions and 12 deletions
|
|
@ -713,11 +713,6 @@ VulkanExampleBase::VulkanExampleBase(bool enableValidation, PFN_GetEnabledFeatur
|
|||
setupConsole("VulkanExample");
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(__ANDROID__)
|
||||
// Android Vulkan initialization is handled in APP_CMD_INIT_WINDOW event
|
||||
initVulkan(enableValidation);
|
||||
#endif
|
||||
}
|
||||
|
||||
VulkanExampleBase::~VulkanExampleBase()
|
||||
|
|
@ -787,7 +782,7 @@ VulkanExampleBase::~VulkanExampleBase()
|
|||
#endif
|
||||
}
|
||||
|
||||
void VulkanExampleBase::initVulkan(bool enableValidation)
|
||||
void VulkanExampleBase::initVulkan()
|
||||
{
|
||||
VkResult err;
|
||||
|
||||
|
|
@ -1229,7 +1224,7 @@ void VulkanExampleBase::handleAppCommand(android_app * app, int32_t cmd)
|
|||
LOGD("APP_CMD_INIT_WINDOW");
|
||||
if (vulkanExample->androidApp->window != NULL)
|
||||
{
|
||||
vulkanExample->initVulkan(false);
|
||||
vulkanExample->initVulkan();
|
||||
vulkanExample->initSwapchain();
|
||||
vulkanExample->prepare();
|
||||
assert(vulkanExample->prepared);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue