GenericMesh

Trait GenericMesh 

Source
pub trait GenericMesh: Debug {
Show 24 methods // Required methods fn get_vk_vertex_buffer(&self) -> VkBuffer; fn get_vk_index_buffer(&self) -> Option<VkBuffer>; fn get_vk_instance_buffer(&self) -> Option<VkBuffer>; fn get_vk_command_buffer(&self) -> Option<VkBuffer>; fn get_primitive_type(&self) -> VkPrimitiveTopology; fn get_vertex_count(&self) -> usize; fn get_index_count(&self) -> usize; fn get_instance_count(&self) -> usize; fn get_command_count(&self) -> usize; fn iter_vertex_buffer_struct_members( &self, ) -> IntoIter<(&'static str, &(dyn Any + 'static))>; fn get_index_type_id(&self) -> Option<TypeId>; fn iter_instance_buffer_struct_members( &self, ) -> Option<IntoIter<(&'static str, &(dyn Any + 'static))>>; fn iter_command_buffer_struct_members( &self, ) -> Option<IntoIter<(&'static str, &(dyn Any + 'static))>>; fn get_vertex_type_name(&self) -> &'static str; fn get_index_type_name(&self) -> &'static str; fn get_instance_type_name(&self) -> &'static str; fn get_command_type_name(&self) -> &'static str; fn get_vertex_stride(&self) -> usize; fn get_index_stride(&self) -> usize; fn get_instance_stride(&self) -> usize; fn get_command_stride(&self) -> usize; fn flush(&mut self, cmdbuf: VkCommandBuffer) -> Result<(), VulkanError>; fn discard_staging_buffers(&mut self); // Provided method fn get_index_type(&self) -> Option<VkIndexType> { ... }
}
Expand description

The trait for a mesh

Required Methods§

Source

fn get_vk_vertex_buffer(&self) -> VkBuffer

Get the vertex buffer

Source

fn get_vk_index_buffer(&self) -> Option<VkBuffer>

Get the index buffer

Source

fn get_vk_instance_buffer(&self) -> Option<VkBuffer>

Get the instance buffer

Source

fn get_vk_command_buffer(&self) -> Option<VkBuffer>

Get the command buffer

Source

fn get_primitive_type(&self) -> VkPrimitiveTopology

Get the primitive type

Source

fn get_vertex_count(&self) -> usize

Get vertex count

Source

fn get_index_count(&self) -> usize

Get index count

Source

fn get_instance_count(&self) -> usize

Get instance count

Source

fn get_command_count(&self) -> usize

Get command count

Source

fn iter_vertex_buffer_struct_members( &self, ) -> IntoIter<(&'static str, &(dyn Any + 'static))>

Get the iterator for the vertex buffer item structure

Source

fn get_index_type_id(&self) -> Option<TypeId>

Get the TypeId of the index buffer item

Source

fn iter_instance_buffer_struct_members( &self, ) -> Option<IntoIter<(&'static str, &(dyn Any + 'static))>>

Get the iterator for the vertex buffer item structure

Source

fn iter_command_buffer_struct_members( &self, ) -> Option<IntoIter<(&'static str, &(dyn Any + 'static))>>

Get the iterator for the vertex buffer item structure

Source

fn get_vertex_type_name(&self) -> &'static str

Get the stride of the vertex buffer

Source

fn get_index_type_name(&self) -> &'static str

Get the stride of the index buffer

Source

fn get_instance_type_name(&self) -> &'static str

Get the stride of the instance buffer

Source

fn get_command_type_name(&self) -> &'static str

Get the stride of the command buffer

Source

fn get_vertex_stride(&self) -> usize

Get the stride of the vertex buffer

Source

fn get_index_stride(&self) -> usize

Get the stride of the index buffer

Source

fn get_instance_stride(&self) -> usize

Get the stride of the instance buffer

Source

fn get_command_stride(&self) -> usize

Get the stride of the command buffer

Source

fn flush(&mut self, cmdbuf: VkCommandBuffer) -> Result<(), VulkanError>

Flush all buffers that needs to be flushed to use

Source

fn discard_staging_buffers(&mut self)

Discard staging buffers if the data will never be modified.

Provided Methods§

Source

fn get_index_type(&self) -> Option<VkIndexType>

Get the index type

Implementors§

Source§

impl<BV, V, BE, E, BI, I, BC, C> GenericMesh for Mesh<BV, V, BE, E, BI, I, BC, C>