[−][src]Struct nannou::vk::FramebufferObject
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]
&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,
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]
R: RenderPassAbstract,
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]
fn default() -> FramebufferObject
[src]
impl Deref for FramebufferObject
[src]
Auto Trait Implementations
impl Send for FramebufferObject
impl Sync for FramebufferObject
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Content for T
[src]
fn ref_from_ptr(ptr: *mut c_void, size: usize) -> Option<*mut T>
[src]
fn is_size_suitable(size: usize) -> bool
[src]
fn indiv_size() -> usize
[src]
impl<T> SafeBorrow<T> for T
[src]
impl<T> Erased for T
impl<S> FromSample<S> for S
[src]
fn from_sample_(s: S) -> S
[src]
impl<T, U> ToSample<U> for T where
U: FromSample<T>,
[src]
U: FromSample<T>,
fn to_sample_(self) -> U
[src]
impl<S, T> Duplex<S> for T where
T: FromSample<S> + ToSample<S>,
[src]
T: FromSample<S> + ToSample<S>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
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>,
T: Parameter<Self>,
Sets value
as a parameter of self
.