pub trait GenericUniformBuffer:
Debug
+ Any
+ Send
+ Sync {
// Required methods
fn get_vk_buffer(&self) -> VkBuffer;
fn iter_members(&self) -> IntoIter<(&'static str, MemberInfo)>;
fn get_size(&self) -> VkDeviceSize;
fn get_staging_buffer_address(&self) -> Result<*mut c_void, VulkanError>;
fn flush(&self, cmdbuf: VkCommandBuffer) -> Result<(), VulkanError>;
}Expand description
The trait for the UniformBuffer to be able to wrap into an object
Required Methods§
Sourcefn get_vk_buffer(&self) -> VkBuffer
fn get_vk_buffer(&self) -> VkBuffer
Get the VkBuffer
Sourcefn iter_members(&self) -> IntoIter<(&'static str, MemberInfo)>
fn iter_members(&self) -> IntoIter<(&'static str, MemberInfo)>
Iterate through the members of the generic type U
Sourcefn get_size(&self) -> VkDeviceSize
fn get_size(&self) -> VkDeviceSize
Get the size of the buffer
Sourcefn get_staging_buffer_address(&self) -> Result<*mut c_void, VulkanError>
fn get_staging_buffer_address(&self) -> Result<*mut c_void, VulkanError>
Get the address of the staging buffer
Sourcefn flush(&self, cmdbuf: VkCommandBuffer) -> Result<(), VulkanError>
fn flush(&self, cmdbuf: VkCommandBuffer) -> Result<(), VulkanError>
Upload to GPU