vOOlkan
An object oriented approach to Vulkan
Vulkan::Framebuffer Class Reference

A Framebuffer links toghether the real attachments (e.g. image views in the swapchain or depth buffers) with the attachments specified in a render pass (which are only descriptions). More...

#include <Framebuffer.h>

Public Member Functions

template<std::same_as< ImageView >... IV>
 Framebuffer (const LogicalDevice &virtualGpu, const PipelineOptions::RenderPass &renderPass, std::pair< unsigned int, unsigned int > resolution, const IV &... imageViews)
 
 Framebuffer (const Framebuffer &)=delete
 
Framebufferoperator= (const Framebuffer &)=delete
 
 Framebuffer (Framebuffer &&movedFrom) noexcept
 
Framebufferoperator= (Framebuffer &&)=default
 
 ~Framebuffer ()
 
const VkFramebuffer & operator+ () const
 
std::pair< unsigned int, unsigned int > getResolution () const
 

Static Public Member Functions

template<std::same_as< ImageView >... IV>
static std::vector< FramebuffergenerateFramebufferForEachSwapchainImageView (const LogicalDevice &virtualGpu, const PipelineOptions::RenderPass &renderPass, const Swapchain &swapchain, const IV &... otherAttachments)
 Creates a framebuffer for each image view in the specified swapchain. It also attaches the specified other attachments to the same framebuffer. More...
 

Detailed Description

A Framebuffer links toghether the real attachments (e.g. image views in the swapchain or depth buffers) with the attachments specified in a render pass (which are only descriptions).

Constructor & Destructor Documentation

◆ Framebuffer() [1/3]

template<std::same_as< ImageView >... IV>
Vulkan::Framebuffer::Framebuffer ( const LogicalDevice virtualGpu,
const PipelineOptions::RenderPass renderPass,
std::pair< unsigned int, unsigned int >  resolution,
const IV &...  imageViews 
)
inline

◆ Framebuffer() [2/3]

Vulkan::Framebuffer::Framebuffer ( const Framebuffer )
delete

◆ Framebuffer() [3/3]

Vulkan::Framebuffer::Framebuffer ( Framebuffer &&  movedFrom)
inlinenoexcept

◆ ~Framebuffer()

Vulkan::Framebuffer::~Framebuffer ( )
inline

Member Function Documentation

◆ generateFramebufferForEachSwapchainImageView()

template<std::same_as< ImageView >... IV>
static std::vector< Framebuffer > Vulkan::Framebuffer::generateFramebufferForEachSwapchainImageView ( const LogicalDevice virtualGpu,
const PipelineOptions::RenderPass renderPass,
const Swapchain swapchain,
const IV &...  otherAttachments 
)
inlinestatic

Creates a framebuffer for each image view in the specified swapchain. It also attaches the specified other attachments to the same framebuffer.

Parameters
virtualGpuThe LogicalDevice where to create the framebuffers.
renderPassThe RenderPass where there should be attachments to link against.
swapchainThe Swapchain where the ImageView(s) are present.
...otherAttachmentsOther attachments to bundle toghether in the framebuffer of each image view of the swapchain.
Returns
A framebuffer vector containing framebuffers made up of each image in the swapchain + otherAttachments.

◆ getResolution()

std::pair< unsigned int, unsigned int > Vulkan::Framebuffer::getResolution ( ) const
inline

◆ operator+()

const VkFramebuffer & Vulkan::Framebuffer::operator+ ( ) const
inline

◆ operator=() [1/2]

Framebuffer & Vulkan::Framebuffer::operator= ( const Framebuffer )
delete

◆ operator=() [2/2]

Framebuffer & Vulkan::Framebuffer::operator= ( Framebuffer &&  )
default

The documentation for this class was generated from the following file: