Trait vulkano::framebuffer::RenderPassDescClearValues
[−]
[src]
pub unsafe trait RenderPassDescClearValues<C> { fn convert_clear_values(&self, _: C) -> Box<Iterator<Item = ClearValue>>; }
Extension trait for RenderPassDesc
. Defines which types are allowed as a list of clear values.
When the user enters a render pass, they need to pass a list of clear values to apply to
the attachments of the framebuffer. To do so, the render pass object or the framebuffer
(depending on the function you use) must implement RenderPassDescClearValues<C>
where C
is
the parameter that the user passed. The trait method is then responsible for checking the
correctness of these values and turning them into a list that can be processed by vulkano.
Required Methods
fn convert_clear_values(&self, _: 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.
The format of the clear value must match the format of the attachment. Attachments
that are not loaded with LoadOp::Clear
must have an entry equal to ClearValue::None
.
Only the attachments whose LoadOp
is Clear
should appear in the list returned by the
method. Other attachments simply should not appear. TODO: check that this is correct.
For example if attachments 1, 2 and 4 are Clear
and attachments 0 and 3 are Load
, then
the list returned by the function must have three elements which are the clear values of
attachments 1, 2 and 4.
Safety
This trait is unsafe because vulkano doesn't check whether the clear value is in a format that matches the attachment.
Implementors
impl RenderPassDescClearValues<Vec<ClearValue>> for EmptySinglePassRenderPassDesc
impl RenderPassDescClearValues<()> for EmptySinglePassRenderPassDesc
impl<C, Rp, A> RenderPassDescClearValues<C> for Framebuffer<Rp, A> where
Rp: RenderPassDescClearValues<C>,impl<C, D> RenderPassDescClearValues<C> for RenderPass<D> where
D: RenderPassDescClearValues<C>,impl<T, C> RenderPassDescClearValues<C> for T where
T: SafeDeref,
T::Target: RenderPassDescClearValues<C>,impl<C, Mv, L, Rp> RenderPassDescClearValues<C> for GraphicsPipeline<Mv, L, Rp> where
Rp: RenderPassDescClearValues<C>,