pub struct Source<C: GpuContext + ?Sized> { /* private fields */ }
Expand description
The source of the GPU renderer.
Implementations§
Source§impl<C: GpuContext + ?Sized> Source<C>
impl<C: GpuContext + ?Sized> Source<C>
Sourcepub fn new(
context: C,
device: &C::Device,
queue: &C::Queue,
) -> Result<Self, Pierror>where
C: Sized,
pub fn new(
context: C,
device: &C::Device,
queue: &C::Queue,
) -> Result<Self, Pierror>where
C: Sized,
Create a new source from a context.
Sourcepub fn context_mut(&mut self) -> &mut C
pub fn context_mut(&mut self) -> &mut C
Get a mutable reference to the context.
Sourcepub fn render_context<'this, 'dev, 'que>(
&'this mut self,
device: &'dev C::Device,
queue: &'que C::Queue,
width: u32,
height: u32,
) -> RenderContext<'this, 'dev, 'que, C>
pub fn render_context<'this, 'dev, 'que>( &'this mut self, device: &'dev C::Device, queue: &'que C::Queue, width: u32, height: u32, ) -> RenderContext<'this, 'dev, 'que, C>
Create a new rendering context.
Sourcepub fn gpu_flushed(&mut self)
pub fn gpu_flushed(&mut self)
Indicate that we’ve flushed the queue and all of the GPU resources can be overwritten.
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for Source<C>where
C: Freeze + ?Sized,
<C as GpuContext>::Texture: Freeze,
<C as GpuContext>::VertexBuffer: Freeze,
impl<C> !RefUnwindSafe for Source<C>
impl<C> !Send for Source<C>
impl<C> !Sync for Source<C>
impl<C> Unpin for Source<C>
impl<C> !UnwindSafe for Source<C>
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> 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, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.