pub struct FramebufferCreateInfo {
    pub flags: FramebufferCreateFlags,
    pub attachments: Vec<Arc<ImageView>>,
    pub extent: [u32; 2],
    pub layers: u32,
    pub _ne: NonExhaustive,
}
Expand description

Parameters to create a new Framebuffer.

Fields§

§flags: FramebufferCreateFlags

Additional properties of the framebuffer.

The default value is empty.

§attachments: Vec<Arc<ImageView>>

The attachment images that are to be used in the framebuffer.

Attachments are specified in the same order as they are defined in the render pass, and there must be exactly as many. This implies that the list must be empty if the render pass specifies no attachments. Each image must have the correct usages set to be used for the types of attachment that the render pass will use it as.

The attachment images must not be smaller than extent and layers, but can be larger and have different sizes from each other. Any leftover parts of an image will be left untouched during rendering.

If the render pass has multiview enabled (views_used does not return 0), then each image must have at least views_used array layers.

The default value is empty.

§extent: [u32; 2]

The extent (width and height) of the framebuffer.

This must be no larger than the smallest width and height of the images in attachments. If one of the elements is set to 0, the extent will be calculated automatically from the extents of the attachment images to be the largest allowed. At least one attachment image must be specified in that case.

The extent, whether automatically calculated or specified explicitly, must not be larger than the max_framebuffer_width and max_framebuffer_height limits.

The default value is [0, 0].

§layers: u32

The number of layers of the framebuffer.

This must be no larger than the smallest number of array layers of the images in attachments. If set to 0, the number of layers will be calculated automatically from the layer ranges of the attachment images to be the largest allowed. At least one attachment image must be specified in that case.

The number of layers, whether automatically calculated or specified explicitly, must not be larger than the max_framebuffer_layers limit.

If the render pass has multiview enabled (views_used does not return 0), then this value must be 0 or 1.

The default value is 0.

§_ne: NonExhaustive

Trait Implementations§

source§

impl Clone for FramebufferCreateInfo

source§

fn clone(&self) -> FramebufferCreateInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FramebufferCreateInfo

source§

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

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

impl Default for FramebufferCreateInfo

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.