Struct amethyst_renderer::SpriteRenderData[][src]

pub struct SpriteRenderData<'a> {
    pub meshes: WriteStorage<'a, MeshHandle>,
    pub materials: WriteStorage<'a, Material>,
    pub material_defaults: ReadExpect<'a, MaterialDefaults>,
    pub loader: ReadExpect<'a, Loader>,
    pub asset_storage: Read<'a, AssetStorage<Mesh>>,
}

SystemData containing the data necessary to handle new rendered sprites

Fields

Storage containing the meshes

Storage containing the materials

Material defaults

Asset loader

Mesh asset storage

Methods

impl<'a> SpriteRenderData<'a>
[src]

Creates a MeshHandle and Material from the sprite and texture data. Useful if you plan on re-using the same sprite a lot and don't want to load the assets each time.

Adds a mesh and a material to an entity corresponding to the sprite and texture given. Note that is you need to insert the same sprite and texture, using add_multiple allows for better performances.

Adds the same mesh and material to multiple entities corresponding to the sprite and texture given.

Trait Implementations

impl<'a> SystemData<'a> for SpriteRenderData<'a> where
    WriteStorage<'a, MeshHandle>: SystemData<'a>,
    WriteStorage<'a, Material>: SystemData<'a>,
    ReadExpect<'a, MaterialDefaults>: SystemData<'a>,
    ReadExpect<'a, Loader>: SystemData<'a>,
    Read<'a, AssetStorage<Mesh>>: SystemData<'a>, 
[src]

Sets up the system data for fetching it from the Resources.

Fetches the system data from Resources. Note that this is only specified for one concrete lifetime 'a, you need to implement the SystemData trait for every possible lifetime. Read more

Important traits for Vec<u8>

Returns all read dependencies as fetched from Self::fetch. Read more

Important traits for Vec<u8>

Returns all write dependencies as fetched from Self::fetch. Read more

Auto Trait Implementations

impl<'a> Send for SpriteRenderData<'a>

impl<'a> Sync for SpriteRenderData<'a>