Struct vulkano::framebuffer::Subpass
source · pub struct Subpass<L> { /* private fields */ }
Expand description
Represents a subpass within a RenderPassAbstract
object.
This struct doesn’t correspond to anything in Vulkan. It is simply an equivalent to a
tuple of a render pass and subpass index. Contrary to a tuple, however, the existence of the
subpass is checked when the object is created. When you have a Subpass
you are guaranteed
that the given subpass does exist.
Implementations
sourceimpl<L> Subpass<L>where
L: RenderPassDesc,
impl<L> Subpass<L>where
L: RenderPassDesc,
sourcepub fn from(render_pass: L, id: u32) -> Option<Subpass<L>>
pub fn from(render_pass: L, id: u32) -> Option<Subpass<L>>
Returns a handle that represents a subpass of a render pass.
sourcepub fn num_color_attachments(&self) -> u32
pub fn num_color_attachments(&self) -> u32
Returns the number of color attachments in this subpass.
sourcepub fn has_depth(&self) -> bool
pub fn has_depth(&self) -> bool
Returns true if the subpass has a depth attachment or a depth-stencil attachment.
sourcepub fn has_writable_depth(&self) -> bool
pub fn has_writable_depth(&self) -> bool
Returns true if the subpass has a depth attachment or a depth-stencil attachment whose
layout is not DepthStencilReadOnlyOptimal
.
sourcepub fn has_stencil(&self) -> bool
pub fn has_stencil(&self) -> bool
Returns true if the subpass has a stencil attachment or a depth-stencil attachment.
sourcepub fn has_writable_stencil(&self) -> bool
pub fn has_writable_stencil(&self) -> bool
Returns true if the subpass has a stencil attachment or a depth-stencil attachment whose
layout is not DepthStencilReadOnlyOptimal
.
sourcepub fn has_color_or_depth_stencil_attachment(&self) -> bool
pub fn has_color_or_depth_stencil_attachment(&self) -> bool
Returns true if the subpass has any color or depth/stencil attachment.
sourcepub fn num_samples(&self) -> Option<u32>
pub fn num_samples(&self) -> Option<u32>
Returns the number of samples in the color and/or depth/stencil attachments. Returns None
if there is no such attachment in this subpass.