pub trait Draw<P: PhaseItem>:
Send
+ Sync
+ 'static {
// Required method
fn draw<'w>(
&mut self,
world: &'w World,
pass: &mut TrackedRenderPass<'w>,
view: Entity,
item: &P,
) -> Result<(), DrawError>;
// Provided method
fn prepare(&mut self, world: &World) { ... }
}Expand description
A draw function used to draw PhaseItems.
The draw function can retrieve and query the required ECS data from the render world.
This trait can either be implemented directly or implicitly composed out of multiple modular
RenderCommands. For more details and an example see the RenderCommand documentation.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".