Struct vulkano::framebuffer::RenderPass
[−]
[src]
pub struct RenderPass<D> { /* fields omitted */ }
Defines the layout of multiple subpasses.
The RenderPass
struct should always implement the RenderPassAbstract
trait. Therefore
you can turn any Arc<RenderPass<D>>
into a Arc<RenderPassAbstract + Send + Sync>
if you need to.
Methods
impl<D> RenderPass<D> where
D: RenderPassDesc,
[src]
D: RenderPassDesc,
fn new(
device: Arc<Device>,
description: D
) -> Result<RenderPass<D>, RenderPassCreationError>
device: Arc<Device>,
description: D
) -> Result<RenderPass<D>, RenderPassCreationError>
Builds a new render pass.
Panic
- Can panic if it detects some violations in the restrictions. Only unexpensive checks are
performed.
debug_assert!
is used, so some restrictions are only checked in debug mode.
impl RenderPass<EmptySinglePassRenderPassDesc>
[src]
fn empty_single_pass(
device: Arc<Device>
) -> Result<RenderPass<EmptySinglePassRenderPassDesc>, RenderPassCreationError>
device: Arc<Device>
) -> Result<RenderPass<EmptySinglePassRenderPassDesc>, RenderPassCreationError>
Builds a render pass with one subpass and no attachment.
This method is useful for quick tests.
impl<D> RenderPass<D>
[src]
fn granularity(&self) -> [u32; 2]
Returns the granularity of this render pass.
If the render area of a render pass in a command buffer is a multiple of this granularity, then the performances will be optimal. Performances are always optimal for render areas that cover the whole framebuffer.
fn desc(&self) -> &D
Returns the description of the render pass.
Note: You must not somehow modify the description. This shouldn't be possible anyway if
RenderPassDesc
was implemented correctly.
Trait Implementations
impl<D> RenderPassDesc for RenderPass<D> where
D: RenderPassDesc,
[src]
D: RenderPassDesc,
fn num_attachments(&self) -> usize
Returns the number of attachments of the render pass.
fn attachment_desc(&self, num: usize) -> Option<LayoutAttachmentDescription>
Returns the description of an attachment. Read more
fn num_subpasses(&self) -> usize
Returns the number of subpasses of the render pass.
fn subpass_desc(&self, num: usize) -> Option<LayoutPassDescription>
Returns the description of a subpass. Read more
fn num_dependencies(&self) -> usize
Returns the number of dependencies of the render pass.
fn dependency_desc(&self, num: usize) -> Option<LayoutPassDependencyDescription>
Returns the description of a dependency. Read more
fn attachment_descs(&self) -> RenderPassDescAttachments<Self> where
Self: Sized,
Self: Sized,
Returns an iterator to the list of attachments.
fn subpass_descs(&self) -> RenderPassDescSubpasses<Self> where
Self: Sized,
Self: Sized,
Returns an iterator to the list of subpasses.
fn dependency_descs(&self) -> RenderPassDescDependencies<Self> where
Self: Sized,
Self: Sized,
Returns an iterator to the list of dependencies.
fn is_compatible_with<T: ?Sized>(&self, other: &T) -> bool where
Self: Sized,
T: RenderPassDesc,
Self: Sized,
T: RenderPassDesc,
Returns true if this render pass is compatible with another render pass. Read more
fn build_render_pass(
self,
device: Arc<Device>
) -> Result<RenderPass<Self>, RenderPassCreationError> where
Self: Sized,
self,
device: Arc<Device>
) -> Result<RenderPass<Self>, RenderPassCreationError> where
Self: Sized,
Builds a render pass from this description. Read more
fn num_color_attachments(&self, subpass: u32) -> Option<u32>
Returns the number of color attachments of a subpass. Returns None
if out of range.
fn num_samples(&self, subpass: u32) -> Option<u32>
Returns the number of samples of the attachments of a subpass. Returns None
if out of range or if the subpass has no attachment. TODO: return an enum instead? Read more
fn has_depth_stencil_attachment(&self, subpass: u32) -> Option<(bool, bool)>
Returns a tuple whose first element is true
if there's a depth attachment, and whose second element is true
if there's a stencil attachment. Returns None
if out of range. Read more
fn has_depth(&self, subpass: u32) -> Option<bool>
Returns true if a subpass has a depth attachment or a depth-stencil attachment.
fn has_writable_depth(&self, subpass: u32) -> Option<bool>
Returns true if a subpass has a depth attachment or a depth-stencil attachment whose layout is not DepthStencilReadOnlyOptimal
. Read more
fn has_stencil(&self, subpass: u32) -> Option<bool>
Returns true if a subpass has a stencil attachment or a depth-stencil attachment.
fn has_writable_stencil(&self, subpass: u32) -> Option<bool>
Returns true if a subpass has a stencil attachment or a depth-stencil attachment whose layout is not DepthStencilReadOnlyOptimal
. Read more
impl<C, D> RenderPassDescClearValues<C> for RenderPass<D> where
D: RenderPassDescClearValues<C>,
[src]
D: RenderPassDescClearValues<C>,
fn convert_clear_values(&self, vals: C) -> Box<Iterator<Item = ClearValue>>
Decodes a C
into a list of clear values where each element corresponds to an attachment. The size of the returned iterator must be the same as the number of attachments. Read more
impl<D> RenderPassAbstract for RenderPass<D> where
D: RenderPassDesc,
[src]
D: RenderPassDesc,
fn inner(&self) -> RenderPassSys
Returns an opaque object representing the render pass' internals. Read more
impl<D> DeviceOwned for RenderPass<D>
[src]
impl<D> Debug for RenderPass<D> where
D: Debug,
[src]
D: Debug,
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.