Trait ark_module::render::RenderModule
source · [−]pub trait RenderModule {
fn new() -> Self;
fn draw(
&mut self,
common_info: &RenderFrameInfo,
object_to_world: Mat4,
static_data: &[u8],
dynamic_data: &[u8],
cache_id: u64
);
fn removed(&mut self, cache_id: u64);
}Expand description
Render module creation & update trait
Required Methods
Implement the rendering for an entity here.
cache_id is unique per entity, and can be used internally to cache entity-specific data.
It is unrelated to the instance_id you can specify in the render API, although you might
find it useful to use the cache_id to come up with suitably unique and stable instance_ids.
static_data is the data array you specified when creating the Shape.
dynamic_data is empty by default but can be set at any time on the Render component of the Entity.