Struct vulkano::render_pass::Framebuffer
source · pub struct Framebuffer { /* private fields */ }
Expand description
The image views that are attached to a render pass during drawing.
A framebuffer is a collection of images, and supplies the actual inputs and outputs of each attachment within a render pass. Each attachment point in the render pass must have a matching image in the framebuffer.
use vulkano::render_pass::{Framebuffer, FramebufferCreateInfo};
// let render_pass: Arc<_> = ...;
let framebuffer = Framebuffer::new(
render_pass.clone(),
FramebufferCreateInfo {
attachments: vec![view],
..Default::default()
},
).unwrap();
Implementations§
source§impl Framebuffer
impl Framebuffer
sourcepub fn new(
render_pass: Arc<RenderPass>,
create_info: FramebufferCreateInfo
) -> Result<Arc<Framebuffer>, FramebufferCreationError>
pub fn new(
render_pass: Arc<RenderPass>,
create_info: FramebufferCreateInfo
) -> Result<Arc<Framebuffer>, FramebufferCreationError>
Creates a new Framebuffer
.
sourcepub unsafe fn from_handle(
render_pass: Arc<RenderPass>,
handle: Framebuffer,
create_info: FramebufferCreateInfo
) -> Arc<Framebuffer>
pub unsafe fn from_handle(
render_pass: Arc<RenderPass>,
handle: Framebuffer,
create_info: FramebufferCreateInfo
) -> Arc<Framebuffer>
Creates a new Framebuffer
from a raw object handle.
Safety
handle
must be a valid Vulkan object handle created fromrender_pass
.create_info
must match the info used to create the object.
sourcepub fn render_pass(&self) -> &Arc<RenderPass>
pub fn render_pass(&self) -> &Arc<RenderPass>
Returns the renderpass that was used to create this framebuffer.
sourcepub fn attachments(&self) -> &[Arc<dyn ImageViewAbstract>]
pub fn attachments(&self) -> &[Arc<dyn ImageViewAbstract>]
Returns the attachments of the framebuffer.