Struct rafx::assets::AssetManager
source · pub struct AssetManager { /* private fields */ }
Implementations§
source§impl AssetManager
impl AssetManager
pub fn new( device_context: &RafxDeviceContext, render_registry: &RenderRegistry, upload_queue_config: UploadQueueConfig, graphics_queue: &RafxQueue, transfer_queue: &RafxQueue ) -> Result<AssetManager, RafxError>
pub fn register_asset_type( &mut self, asset_type: Box<dyn AssetTypeHandler> ) -> Result<(), RafxError>
pub fn register_default_asset_types( &mut self, asset_resource: &mut ArtifactManager, _render_resources: &mut ResourceMap ) -> Result<(), RafxError>
pub fn committed_asset<AssetT>(
&self,
handle: &Handle<AssetT>
) -> Option<&AssetT>where
AssetT: 'static,
pub fn latest_asset<AssetT>(&self, handle: &Handle<AssetT>) -> Option<&AssetT>where
AssetT: 'static,
pub fn wait_for_asset_to_load<T, TickFn>( &mut self, asset_handle: &Handle<T>, asset_resource: &mut ArtifactManager, asset_name: &str, tick_fn: TickFn ) -> Result<(), RafxError>
pub fn device_context(&self) -> &RafxDeviceContext
pub fn graphics_queue(&self) -> &RafxQueue
pub fn transfer_queue(&self) -> &RafxQueue
pub fn resource_manager(&self) -> &ResourceManager
pub fn resource_manager_mut(&mut self) -> &mut ResourceManager
pub fn resources(&self) -> &ResourceLookupSet
pub fn graphics_pipeline_cache(&self) -> &GraphicsPipelineCache
pub fn dyn_command_pool_allocator(&self) -> &DynCommandPoolAllocator
pub fn create_dyn_resource_allocator_set(&self) -> DynResourceAllocatorSet
pub fn create_dyn_resource_allocator_provider( &self ) -> DynResourceAllocatorSetProvider
pub fn create_descriptor_set_allocator(&self) -> DescriptorSetAllocatorRef
pub fn create_descriptor_set_allocator_provider( &self ) -> DescriptorSetAllocatorProvider
pub fn upload_queue_context(&self) -> UploadQueueContext
pub fn get_descriptor_set_layout_for_pass( &self, handle: &Handle<MaterialAsset>, pass_index: usize, layout_index: usize ) -> Option<ResourceArc<DescriptorSetLayoutResource>>
pub fn update_asset_loaders(&mut self) -> Result<(), RafxError>
pub fn on_begin_frame(&mut self) -> Result<(), RafxError>
pub fn on_frame_complete(&mut self) -> Result<(), RafxError>
pub fn metrics(&self) -> AssetManagerMetrics
pub fn apply_material_instance_slot_assignment( &self, slot_assignment: &MaterialInstanceSlotAssignment, pass_slot_name_lookup: &HashMap<String, HashSet<SlotLocation, BuildHasherDefault<FnvHasher>>, BuildHasherDefault<FnvHasher>>, resources: &ResourceLookupSet, material_pass_write_set: &mut Vec<DescriptorSetWriteSet> ) -> Result<(), RafxError>
pub fn create_write_sets_for_material_instance_pass( &self, pass: &MaterialPass, slots: &[MaterialInstanceSlotAssignment], resources: &ResourceLookupSet ) -> Result<Vec<DescriptorSetWriteSet>, RafxError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AssetManager
impl Send for AssetManager
impl Sync for AssetManager
impl Unpin for AssetManager
impl !UnwindSafe for AssetManager
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.