pub struct PassView<'r> { /* private fields */ }Expand description
Read-only paint view returned by ViewportRenderer::pass_view.
Identical to PassPath but constructed from a shared reference, making it
usable in framework paint callbacks where only & access to the renderer is
available (e.g. eframe’s CallbackTrait::paint).
Implementations§
Source§impl<'r> PassView<'r>
impl<'r> PassView<'r>
Sourcepub fn paint<'rp>(&self, render_pass: &mut RenderPass<'rp>, frame: &FrameData)
pub fn paint<'rp>(&self, render_pass: &mut RenderPass<'rp>, frame: &FrameData)
Single viewport: issue draw calls into render_pass.
Sourcepub fn paint_viewport<'rp>(
&self,
render_pass: &mut RenderPass<'rp>,
id: ViewportId,
frame: &FrameData,
)
pub fn paint_viewport<'rp>( &self, render_pass: &mut RenderPass<'rp>, id: ViewportId, frame: &FrameData, )
Multi-viewport: issue draw calls for id into render_pass.
Sourcepub fn paint_hdr_blit<'rp>(
&self,
render_pass: &mut RenderPass<'rp>,
frame: &FrameData,
)
pub fn paint_hdr_blit<'rp>( &self, render_pass: &mut RenderPass<'rp>, frame: &FrameData, )
Multi-viewport HDR: blit the intermediate texture for frame’s viewport into render_pass.
Call after PassPath::prepare_hdr_viewport for the same viewport. Set the render
pass viewport and scissor rect to the correct region before calling.
The render pass must have a Depth24PlusStencil8 depth-stencil attachment (as eframe
callbacks always do). For render passes without a depth attachment (e.g. a plain winit
blit pass), use paint_hdr_blit_no_ds instead.
Sourcepub fn paint_hdr_blit_no_ds<'rp>(
&self,
render_pass: &mut RenderPass<'rp>,
frame: &FrameData,
)
pub fn paint_hdr_blit_no_ds<'rp>( &self, render_pass: &mut RenderPass<'rp>, frame: &FrameData, )
Like [paint_hdr_blit] but for render passes without a depth-stencil attachment.
Use this when you create the blit render pass yourself (e.g. winit) and the pass has no depth attachment. The resulting blit is identical; only the pipeline variant differs to match the render pass format.
Auto Trait Implementations§
impl<'r> !RefUnwindSafe for PassView<'r>
impl<'r> !UnwindSafe for PassView<'r>
impl<'r> Freeze for PassView<'r>
impl<'r> Send for PassView<'r>
impl<'r> Sync for PassView<'r>
impl<'r> Unpin for PassView<'r>
impl<'r> UnsafeUnpin for PassView<'r>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn 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>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which 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)
&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)
&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> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.