Introduce usage of [[nodiscard]] with C++17
This commit is contained in:
committed by
Markus Tavenrath
parent
43df4dd0f1
commit
4cdc51ba0f
@@ -160,13 +160,20 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
vk::UniqueFence drawFence = device->createFenceUnique( vk::FenceCreateInfo() );
|
||||
|
||||
vk::PipelineStageFlags waitDestinationStageMask( vk::PipelineStageFlagBits::eColorAttachmentOutput );
|
||||
vk::SubmitInfo submitInfo( *imageAcquiredSemaphore, waitDestinationStageMask, *commandBuffer );
|
||||
vk::SubmitInfo submitInfo( *imageAcquiredSemaphore, waitDestinationStageMask, *commandBuffer );
|
||||
graphicsQueue.submit( submitInfo, drawFence.get() );
|
||||
|
||||
while ( vk::Result::eTimeout == device->waitForFences( drawFence.get(), VK_TRUE, vk::su::FenceTimeout ) )
|
||||
;
|
||||
|
||||
presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer.value ) );
|
||||
vk::Result result =
|
||||
presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer.value ) );
|
||||
switch ( result )
|
||||
{
|
||||
case vk::Result::eSuccess: break;
|
||||
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
|
||||
default: assert( false ); // an unexpected result is returned !
|
||||
}
|
||||
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );
|
||||
|
||||
/* VULKAN_KEY_END */
|
||||
|
||||
Reference in New Issue
Block a user