Hymn to Beauty
C++ 3D Engine
Video::VulkanRenderPass Class Reference

Vulkan implementation of RenderPass. More...

#include <VulkanRenderPass.hpp>

Inheritance diagram for Video::VulkanRenderPass:
Video::RenderPass

Classes

struct  Compatibility
 Compatibility information about the render pass. More...
 

Public Member Functions

 VulkanRenderPass (VkDevice device, Texture *colorAttachment, RenderPass::LoadOperation colorLoadOperation, Texture *depthAttachment, RenderPass::LoadOperation depthLoadOperation)
 Create new Vulkan render pass. More...
 
 VulkanRenderPass (VkDevice device, const glm::uvec2 &size, uint32_t msaaSamples)
 Create new attachmentless Vulkan render pass. More...
 
 ~VulkanRenderPass () final
 Destructor. More...
 
const glm::uvec2 & GetSize () const final
 Get the size of the frame buffer. More...
 
VkRenderPass GetRenderPass () const
 Get the Vulkan render pass. More...
 
VkFramebuffer GetFramebuffer () const
 Get the Vulkan framebuffer. More...
 
bool HasColorAttachment () const
 Get whether there is a color attachment. More...
 
VulkanTextureGetColorAttachment () const
 Get the first color attachment. More...
 
bool HasDepthAttachment () const
 Get whether there is a depth attachment. More...
 
VulkanTextureGetDepthAttachment () const
 Get the depth attachment. More...
 
const CompatibilityGetCompatiblity () const
 Get the render pass' compatibility information. More...
 
- Public Member Functions inherited from Video::RenderPass
 RenderPass ()
 Create new render pass. More...
 
virtual ~RenderPass ()
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from Video::RenderPass
enum class  LoadOperation { LOAD , CLEAR , DONT_CARE }
 What to do with an image being rendered to before rendering to it. More...
 

Detailed Description

Vulkan implementation of RenderPass.

Constructor & Destructor Documentation

◆ VulkanRenderPass() [1/2]

Video::VulkanRenderPass::VulkanRenderPass ( VkDevice  device,
Texture colorAttachment,
RenderPass::LoadOperation  colorLoadOperation,
Texture depthAttachment,
RenderPass::LoadOperation  depthLoadOperation 
)

Create new Vulkan render pass.

Parameters
deviceThe Vulkan device.
colorAttachmentThe color attachment to draw to.
colorLoadOperationWhat to do with the previous contents of the color attachment.
depthAttachmentThe depth attachment to draw to.
depthLoadOperationWhat to do with the previous contents of the depth attachment.

◆ VulkanRenderPass() [2/2]

Video::VulkanRenderPass::VulkanRenderPass ( VkDevice  device,
const glm::uvec2 &  size,
uint32_t  msaaSamples 
)

Create new attachmentless Vulkan render pass.

Parameters
deviceThe Vulkan device.
sizeThe size of the framebuffer.
msaaSamplesThe number of MSAA samples.

◆ ~VulkanRenderPass()

Video::VulkanRenderPass::~VulkanRenderPass ( )
final

Destructor.

Member Function Documentation

◆ GetColorAttachment()

VulkanTexture * Video::VulkanRenderPass::GetColorAttachment ( ) const

Get the first color attachment.

Returns
The first color attachment.

◆ GetCompatiblity()

const VulkanRenderPass::Compatibility & Video::VulkanRenderPass::GetCompatiblity ( ) const

Get the render pass' compatibility information.

Returns
The compatibility information.

◆ GetDepthAttachment()

VulkanTexture * Video::VulkanRenderPass::GetDepthAttachment ( ) const

Get the depth attachment.

Returns
The depth attachment.

◆ GetFramebuffer()

VkFramebuffer Video::VulkanRenderPass::GetFramebuffer ( ) const

Get the Vulkan framebuffer.

Returns
The internal Vulkan framebuffer.

◆ GetRenderPass()

VkRenderPass Video::VulkanRenderPass::GetRenderPass ( ) const

Get the Vulkan render pass.

Returns
The internal Vulkan render pass.

◆ GetSize()

const glm::uvec2 & Video::VulkanRenderPass::GetSize ( ) const
finalvirtual

Get the size of the frame buffer.

Returns
The size of the frame buffer in pixels.

Implements Video::RenderPass.

◆ HasColorAttachment()

bool Video::VulkanRenderPass::HasColorAttachment ( ) const

Get whether there is a color attachment.

Returns
Whether there is a color attachment.

◆ HasDepthAttachment()

bool Video::VulkanRenderPass::HasDepthAttachment ( ) const

Get whether there is a depth attachment.

Returns
Whether there is a depth attachment.

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