Struct ascending_graphics::GpuRenderer
source · pub struct GpuRenderer {
pub font_sys: FontSystem,
pub buffer_object: StaticBufferObject,
/* private fields */
}Expand description
Handles the Window, Device and buffer stores.
Fields§
§font_sys: FontSystem§buffer_object: StaticBufferObjectImplementations§
source§impl GpuRenderer
impl GpuRenderer
pub fn new(window: GpuWindow, device: GpuDevice) -> Self
pub fn adapter(&self) -> &Adapter
pub fn resize(&mut self, size: PhysicalSize<u32>) -> Result<(), GraphicsError>
pub fn frame_buffer(&self) -> &Option<TextureView>
pub fn depth_buffer(&self) -> &TextureView
pub fn size(&self) -> PhysicalSize<f32>
pub fn inner_size(&self) -> PhysicalSize<u32>
pub fn surface(&self) -> &Surface<'_>
pub fn surface_format(&self) -> TextureFormat
pub fn update(&mut self, event: &Event<()>) -> Result<bool, GraphicsError>
pub fn window(&self) -> &Window
pub fn update_depth_texture(&mut self)
pub fn present(&mut self) -> Result<(), GraphicsError>
pub fn device(&self) -> &Device
pub fn gpu_device(&self) -> &GpuDevice
pub fn queue(&self) -> &Queue
pub fn font_sys(&self) -> &FontSystem
pub fn font_sys_mut(&mut self) -> &mut FontSystem
pub fn new_buffer(&mut self, store_size: usize, index_size: usize) -> Index
pub fn default_buffer(&mut self) -> Index
pub fn remove_buffer(&mut self, index: Index)
pub fn get_buffer(&self, index: Index) -> Option<&BufferStore>
pub fn get_buffer_mut(&mut self, index: Index) -> Option<&mut BufferStore>
pub fn create_layout<K: Layout>(&mut self, layout: K) -> Rc<BindGroupLayout>
pub fn create_pipelines(&mut self, surface_format: TextureFormat)
pub fn get_pipelines<K: PipeLineLayout>( &self, pipeline: K ) -> Option<&RenderPipeline>
Auto Trait Implementations§
impl !Freeze for GpuRenderer
impl !RefUnwindSafe for GpuRenderer
impl !Send for GpuRenderer
impl !Sync for GpuRenderer
impl Unpin for GpuRenderer
impl !UnwindSafe for GpuRenderer
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§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.source§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.source§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.source§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.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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