[][src]Struct nannou::vk::FramebufferObject

pub struct FramebufferObject { /* fields omitted */ }

The FramebufferObject or Fbo type for easy management of a framebuffer.

Creating and maintaining a framebuffer and ensuring it is up to date with the given renderpass and images can be a tedious task that requires a lot of boilerplate code. This type simplifies the process with a single update method that creates or recreates the framebuffer if any of the following conditions are met:

  • The update method is called for the first time.
  • The given render pass is different to that which was used to create the existing framebuffer.
  • The dimensions of the framebuffer don't match the dimensions of the images.

Methods

impl FramebufferObject[src]

pub fn inner(&self) -> &Option<Arc<dyn FramebufferAbstract + Send + Sync>>[src]

Access the inner framebuffer trait object.

pub fn update<R, F, A>(
    &mut self,
    render_pass: R,
    dimensions: [u32; 3],
    builder: F
) -> Result<(), FramebufferCreationError> where
    R: 'static + RenderPassAbstract + Send + Sync,
    F: FnOnce(FramebufferBuilder<R, ()>) -> FramebufferBuilderResult<R, A>,
    A: 'static + AttachmentsList + Send + Sync
[src]

Ensure the framebuffer is up to date with the given dimensions and render pass.

pub fn expect_inner(&self) -> Arc<dyn FramebufferAbstract + Send + Sync>[src]

Expects that there is a inner framebuffer object instantiated and returns it.

**panic!**s if the update method has not yet been called.

This method is shorthand for fbo.as_ref().expect("inner framebuffer was None").clone().

pub fn render_passes_match<R>(&self, render_pass: R) -> bool where
    R: RenderPassAbstract
[src]

Whether or not the given renderpass matches the framebuffer's render pass.

pub fn dimensions_match(&self, dimensions: [u32; 3]) -> bool[src]

Whether or not the given dimensions match the current dimensions.

Trait Implementations

impl Default for FramebufferObject[src]

impl Deref for FramebufferObject[src]

type Target = Option<Arc<dyn FramebufferAbstract + Send + Sync>>

The resulting type after dereferencing.

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Content for T[src]

impl<T> SafeBorrow<T> for T[src]

impl<T> Erased for T

impl<S> FromSample<S> for S[src]

impl<T, U> ToSample<U> for T where
    U: FromSample<T>, 
[src]

impl<S, T> Duplex<S> for T where
    T: FromSample<S> + ToSample<S>, 
[src]

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.