constructor forwards parameter 'device' to 'this.loadDeviceLevelFunctions'
convenience member functions, forwarded to corresponding vulkan functions parameters of type VkDevice, const( VkAllocationCallbacks )* and VkCommandBuffer are omitted they will be supplied by the member properties vkDevice, pAllocator and the public member commandBuffer e.g.: auto dd = DispatchDevice( device ); dd.DestroyDevice(); // instead of: dd.vkDestroyDevice( dd.vkDevice, pAllocator );
load the device level member functions this also sets the private member 'device' to the passed in VkDevice as well as the otional host allocator if a custom allocator is required it must be specified here and cannot be changed throughout the liftime of the device now the DispatchDevice can be used e.g.: auto dd = DispatchDevice( device ); dd.vkDestroyDevice( dd.vkDevice, pAllocator ); convenience functions to omit the first arg and the allocator do exist, see bellow
return const allocator address
return copy of the internal VkDevice
member function pointer decelerations
struct to group per device device level functions into a custom namespace keeps track of the device to which the functions are bound additionally to the device related vulkan functions, convenience functions exist with same name but omitting the vk prefix as well as the first (VkDevice) parameter these functions forward to their vk counterparts using the VkDevice member of the DispatchDevice Moreover the same convenience functions exist for vkCmd... functions. In this case the first parameter is substituted with the public member VkCommandBuffer commandBuffer, which must have been set to a valid command buffer before usage.