[][src]Trait vulkano::framebuffer::RenderPassAbstract

pub unsafe trait RenderPassAbstract: DeviceOwned + RenderPassDesc {
    fn inner(&self) -> RenderPassSys;

Trait for objects that contain a Vulkan render pass object.

Any RenderPass object implements this trait. You can therefore turn a Arc<RenderPass<_>> into a Arc<RenderPassAbstract + Send + Sync> for easier storage.

The Arc<RenderPassAbstract + Send + Sync> accepts a Vec<ClearValue> for clear values and a Vec<Arc<ImageView + Send + Sync>> for the list of attachments.


use std::sync::Arc;
use vulkano::framebuffer::EmptySinglePassRenderPassDesc;
use vulkano::framebuffer::RenderPass;
use vulkano::framebuffer::RenderPassAbstract;

let render_pass = RenderPass::new(device.clone(), EmptySinglePassRenderPassDesc).unwrap();

// For easier storage, turn this render pass into a `Arc<RenderPassAbstract + Send + Sync>`.
let stored_rp = Arc::new(render_pass) as Arc<RenderPassAbstract + Send + Sync>;

Required methods

fn inner(&self) -> RenderPassSys

Returns an opaque object representing the render pass' internals.


The trait implementation must return the same value every time.

Loading content...


impl<D> RenderPassAbstract for RenderPass<D> where
    D: RenderPassDesc

impl<Mv, L, Rp> RenderPassAbstract for GraphicsPipeline<Mv, L, Rp> where
    Rp: RenderPassAbstract

impl<Rp, A> RenderPassAbstract for Framebuffer<Rp, A> where
    Rp: RenderPassAbstract

impl<T> RenderPassAbstract for T where
    T: SafeDeref,
    T::Target: RenderPassAbstract

Loading content...