Struct vulkano::render_pass::FramebufferCreateInfo
source · 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
sourceimpl Clone for FramebufferCreateInfo
impl Clone for FramebufferCreateInfo
sourcefn clone(&self) -> FramebufferCreateInfo
fn clone(&self) -> FramebufferCreateInfo
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more