Trait keeshond_datapack::DataPreparer
source · [−]pub trait DataPreparer<T: DataObject + 'static, U> {
fn prepare(&mut self, data: &mut T, id: DataId<T>) -> U;
fn unprepare(&mut self, prepared: &mut U, id: DataId<T>);
fn reprepare(&mut self, data: &mut T, prepared: &mut U, id: DataId<T>) { ... }
}
Expand description
Used with PreparedStore, this allows the definition of behavior when initializing resources with a backend. See PreparedStore for more information.
Required methods
Called when data has been loaded but not “prepared” yet. You can use this, for example, to load textures onto the GPU.