Provide default arguments in ObjectFree constructor for allocationCallbacks and dispatcher.

This commit is contained in:
asuessenbach
2020-06-18 11:00:22 +02:00
parent 5bee99f228
commit 92bc17981b
3 changed files with 38 additions and 26 deletions

View File

@@ -61,6 +61,12 @@ int main( int /*argc*/, char ** /*argv*/ )
std::vector<vk::UniqueHandle<vk::CommandBuffer, vk::DispatchLoaderDynamic>>::allocator_type dynamicVectorAllocator;
vk::UniqueHandle<vk::CommandBuffer, vk::DispatchLoaderDynamic> dynamicCommandBuffer = std::move(
device->allocateCommandBuffersUnique( {}, dynamicVectorAllocator, vk::DispatchLoaderDynamic() ).front() );
vk::Buffer buffer = device->createBuffer( {} );
vk::UniqueBuffer uniqueBuffer = vk::UniqueBuffer( buffer, *device );
vk::DeviceMemory deviceMemory = device->allocateMemory( {} );
vk::UniqueDeviceMemory uniqueDeviceMemory = vk::UniqueDeviceMemory( deviceMemory, *device );
}
catch ( vk::SystemError const & err )
{