pub struct GpuAssetServer {
pub meshes: MeshStore,
pub textures: GpuTextureStore,
pub materials: MaterialStore,
pub shaders: ShaderRegistry,
pub techniques: TechniqueRegistry,
pub descriptors: DescriptorAllocator,
pub samplers: SamplerStore,
/* private fields */
}Fields§
§meshes: MeshStore§textures: GpuTextureStore§materials: MaterialStore§shaders: ShaderRegistry§techniques: TechniqueRegistry§descriptors: DescriptorAllocator§samplers: SamplerStoreImplementations§
Source§impl GpuAssetServer
impl GpuAssetServer
pub fn new( device: Device, physical_device: PhysicalDevice, instance: Instance, command_pool: CommandPool, queue: Queue, ) -> Result<Self>
pub fn bindless_set(&self) -> DescriptorSetId
pub fn bind_uniform_buffer( &self, set: DescriptorSetId, binding: u32, buffer: Buffer, size: DeviceSize, )
pub fn bind_mapped_uniform_buffer<T: Copy>( &self, set: DescriptorSetId, binding: u32, mapped: &MappedGpuBuffer<T>, )
pub fn bind_storage_buffer( &self, set: DescriptorSetId, binding: u32, buffer: Buffer, size: DeviceSize, )
pub fn bind_mapped_storage_buffer<T: Copy>( &self, set: DescriptorSetId, binding: u32, mapped: &MappedGpuBuffer<T>, )
pub fn bind_sampled_image( &self, set: DescriptorSetId, binding: u32, view: ImageView, layout: ImageLayout, sampler: SamplerId, )
pub fn create_graphics_pipeline( &mut self, desc: &PipelineDesc<'_>, set_layouts: &[DescriptorSetId], ) -> Result<PipelineId>
pub fn create_mapped_buffer<T: Copy>( &self, usage: BufferUsage, capacity: usize, ) -> Result<MappedGpuBuffer<T>>
pub fn pipeline_cache(&self) -> &PipelineCache
pub fn device(&self) -> &Device
pub fn command_pool(&self) -> CommandPool
Auto Trait Implementations§
impl Freeze for GpuAssetServer
impl RefUnwindSafe for GpuAssetServer
impl Send for GpuAssetServer
impl Sync for GpuAssetServer
impl Unpin for GpuAssetServer
impl UnsafeUnpin for GpuAssetServer
impl UnwindSafe for GpuAssetServer
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> Component for T
§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more