pub struct RenderContext<'a> {
pub device: &'a Device,
pub queue: &'a Queue,
pub encoder: &'a mut CommandEncoder,
pub view: &'a TextureView,
pub depth_view: &'a TextureView,
pub camera: &'a Camera,
pub materials: &'a MaterialRegistry,
pub color_maps: &'a ColorMapRegistry,
}Expand description
Render context passed to structures during drawing.
Fields§
§device: &'a DeviceThe wgpu device.
queue: &'a QueueThe wgpu queue.
encoder: &'a mut CommandEncoderThe command encoder.
view: &'a TextureViewThe target texture view.
depth_view: &'a TextureViewThe depth texture view.
camera: &'a CameraThe current camera.
materials: &'a MaterialRegistryThe material registry.
color_maps: &'a ColorMapRegistryThe color map registry.
Trait Implementations§
impl RenderContext for RenderContext<'_>
Auto Trait Implementations§
impl<'a> Freeze for RenderContext<'a>
impl<'a> !RefUnwindSafe for RenderContext<'a>
impl<'a> Send for RenderContext<'a>
impl<'a> Sync for RenderContext<'a>
impl<'a> Unpin for RenderContext<'a>
impl<'a> !UnwindSafe for RenderContext<'a>
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> 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