logo
pub struct FramebufferCreateInfo {
    pub attachments: Vec<Arc<dyn ImageViewAbstract>>,
    pub extent: [u32; 2],
    pub layers: u32,
    pub _ne: NonExhaustive,
}
Expand description

Parameters to create a new Framebuffer.

Fields

attachments: Vec<Arc<dyn ImageViewAbstract>>

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.