pub struct DrawContext<'a, 'b, 'c, T> {
pub graphics: &'a GraphicsDevice,
pub device: &'a Device,
pub queue: &'a Queue,
pub config: &'a SurfaceConfiguration,
pub target_size: PxSize,
pub render_pass: &'a mut RenderPass<'b>,
pub commands: &'c [(&'c T, DrawGeometry)],
pub scene_texture_view: &'a TextureView,
pub scene_rect: PxRect,
pub clip_rect: Option<PxRect>,
}Expand description
A batch of drawing commands within an active render pass.
Fields§
§graphics: &'a GraphicsDeviceRenderer-owned resource creation and uploads.
device: &'a DeviceThe WGPU device.
queue: &'a QueueThe WGPU queue.
config: &'a SurfaceConfigurationThe current surface configuration.
target_size: PxSizeTarget texture size for the current pass.
render_pass: &'a mut RenderPass<'b>The active render pass encoder.
commands: &'c [(&'c T, DrawGeometry)]The draw commands to be processed.
scene_texture_view: &'a TextureViewScene pixels sampled by commands that declare a sample region.
scene_rect: PxRectWindow rectangle of the valid pixels in scene_texture_view, whose
first texel is at the rectangle’s origin. The texture can be larger.
clip_rect: Option<PxRect>An optional clipping rectangle for the draw call.
Auto Trait Implementations§
impl<'a, 'b, 'c, T> !RefUnwindSafe for DrawContext<'a, 'b, 'c, T>
impl<'a, 'b, 'c, T> !UnwindSafe for DrawContext<'a, 'b, 'c, T>
impl<'a, 'b, 'c, T> Freeze for DrawContext<'a, 'b, 'c, T>
impl<'a, 'b, 'c, T> Send for DrawContext<'a, 'b, 'c, T>where
T: Sync,
impl<'a, 'b, 'c, T> Sync for DrawContext<'a, 'b, 'c, T>where
T: Sync,
impl<'a, 'b, 'c, T> Unpin for DrawContext<'a, 'b, 'c, T>
impl<'a, 'b, 'c, T> UnsafeUnpin for DrawContext<'a, 'b, 'c, T>
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> 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> 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>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn 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>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which 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)
Converts
&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)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.