Add default frame submission function to base class
This commit is contained in:
parent
c5e8c178c2
commit
bb8d4c6df1
2 changed files with 13 additions and 1 deletions
|
|
@ -90,6 +90,15 @@ VkResult VulkanExampleBase::createInstance(bool enableValidation)
|
|||
return vkCreateInstance(&instanceCreateInfo, nullptr, &instance);
|
||||
}
|
||||
|
||||
void VulkanExampleBase::drawFrame()
|
||||
{
|
||||
VulkanExampleBase::prepareFrame();
|
||||
submitInfo.commandBufferCount = 1;
|
||||
submitInfo.pCommandBuffers = &drawCmdBuffers[currentBuffer];
|
||||
VK_CHECK_RESULT(vkQueueSubmit(queue, 1, &submitInfo, VK_NULL_HANDLE));
|
||||
VulkanExampleBase::submitFrame();
|
||||
}
|
||||
|
||||
std::string VulkanExampleBase::getWindowTitle()
|
||||
{
|
||||
std::string device(deviceProperties.deviceName);
|
||||
|
|
@ -298,7 +307,7 @@ void VulkanExampleBase::renderLoop()
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (!IsIconic(window)) {
|
||||
if (prepared && !IsIconic(window)) {
|
||||
renderFrame();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue