rendy_graph::present

Struct PresentBuilder

Source
pub struct PresentBuilder<B: Backend> { /* private fields */ }
Expand description

Presentation node description.

Implementations§

Source§

impl<B> PresentBuilder<B>
where B: Backend,

Source

pub fn add_dependency(&mut self, dependency: NodeId) -> &mut Self

Add dependency. Node will be placed after its dependencies.

Source

pub fn with_dependency(self, dependency: NodeId) -> Self

Add dependency. Node will be placed after its dependencies.

Source

pub fn with_image_count(self, image_count: u32) -> Self

Request a number of images in the swapchain. This is not guaranteed to be the final image count, but it will be if supported by the hardware.

Check PresentBuilder::image_count() after calling this function but before building to see the final image count.

Source

pub fn with_blit_filter(self, filter: Filter) -> Self

Set up filter used for resizing when backbuffer size does not match source image size.

Default is Nearest.

Source

pub fn with_present_modes_priority<PF>(self, present_modes_priority: PF) -> Self
where PF: Fn(PresentMode) -> Option<usize>,

Request a priority of present modes when creating the swapchain for the PresentNode. Lower index means higher priority.

Check PresentBuilder::present_mode() after calling this function but before building to see the final present mode.

§Parameters
  • present_modes_priority: A function which takes a rendy_core::hal::PresentMode and returns an Option<usize>. None indicates not to use this mode, and a higher number returned indicates a higher prioirity for that mode.
§Panics
  • Panics if none of the provided PresentModes are supported.
Source

pub fn image_count(&self) -> u32

Get image count in presentable swapchain.

Source

pub fn present_mode(&self) -> PresentMode

Get present mode used by node.

Trait Implementations§

Source§

impl<B: Debug + Backend> Debug for PresentBuilder<B>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<B, T> NodeBuilder<B, T> for PresentBuilder<B>
where B: Backend, T: ?Sized,

Source§

fn family( &self, factory: &mut Factory<B>, families: &Families<B>, ) -> Option<FamilyId>

Pick family for this node to be executed onto.
Source§

fn buffers(&self) -> Vec<(BufferId, BufferAccess)>

Get buffer accessed by the node.
Source§

fn images(&self) -> Vec<(ImageId, ImageAccess)>

Get images accessed by the node.
Source§

fn dependencies(&self) -> Vec<NodeId>

Indices of nodes this one dependes on.
Source§

fn build<'a>( self: Box<Self>, ctx: &GraphContext<B>, factory: &mut Factory<B>, family: &mut Family<B>, _queue: usize, _aux: &T, buffers: Vec<NodeBuffer>, images: Vec<NodeImage>, ) -> Result<Box<dyn DynNode<B, T>>, NodeBuildError>

Build node.

Auto Trait Implementations§

§

impl<B> Freeze for PresentBuilder<B>
where <B as Backend>::Surface: Freeze,

§

impl<B> RefUnwindSafe for PresentBuilder<B>
where <B as Backend>::Surface: RefUnwindSafe,

§

impl<B> Send for PresentBuilder<B>

§

impl<B> Sync for PresentBuilder<B>

§

impl<B> Unpin for PresentBuilder<B>
where <B as Backend>::Surface: Unpin,

§

impl<B> UnwindSafe for PresentBuilder<B>
where <B as Backend>::Surface: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.