NDEVR
API Documentation
VulkanRenderDefinition

Creates specific information for performing a render pass within Vulkan. More...

Collaboration diagram for VulkanRenderDefinition:
[legend]

Public Member Functions

 VulkanRenderDefinition (const DynamicPointer< VulkanDevice > &instance)
 Constructs a render definition for the given device.
 ~VulkanRenderDefinition ()
 Destructor.
void cleanup ()
 Releases all render pass resources.
void createRenderPass (uint04 multisample, bool is_grab_image)
 Creates a render pass with the given multisample count.
Buffer< VkAttachmentDescription, BufferAllocator< VkAttachmentDescription, 64, true > > getAttachments (uint04 multisample_count, bool is_grab_image, uint08 format) const
 Returns the attachment descriptions for a render pass configuration.
VkFormat getSwapChainImageFormat () const
 Returns the swap chain image format.
VkRenderPass renderPass (uint04 multisample, bool is_grab_image) const
 Returns the render pass for the given configuration.
void setDevice (const ConstPointer< VulkanDevice > &instance)
 Sets the Vulkan device.
void setSwapChainImageFormat (VkFormat format)
 Sets the swap chain image format.

Protected Attributes

ConstPointer< VulkanDevicem_device
 The Vulkan device.
Dictionary< uint04, VkRenderPass > m_render_pass_grab
 Render passes for grab images, keyed by multisample count.
Dictionary< uint04, VkRenderPass > m_render_pass_khr
 Render passes for KHR swap chain images, keyed by multisample count.
VkFormat m_swap_chain_image_format
 The image format used by the swap chain.
bool m_use_depth
 Whether depth testing is enabled for these render passes.

Detailed Description

Creates specific information for performing a render pass within Vulkan.


Definition at line 45 of file VulkanRenderDefinition.h.

Constructor & Destructor Documentation

◆ VulkanRenderDefinition()

VulkanRenderDefinition::VulkanRenderDefinition ( const DynamicPointer< VulkanDevice > & instance)

Constructs a render definition for the given device.

Parameters
[in]instanceThe Vulkan device.

Member Function Documentation

◆ createRenderPass()

void VulkanRenderDefinition::createRenderPass ( uint04 multisample,
bool is_grab_image )

Creates a render pass with the given multisample count.

Parameters
[in]multisampleThe multisample count.
[in]is_grab_imageWhether this render pass targets a grab (readback) image.

◆ getAttachments()

Buffer< VkAttachmentDescription, BufferAllocator< VkAttachmentDescription, 64, true > > VulkanRenderDefinition::getAttachments ( uint04 multisample_count,
bool is_grab_image,
uint08 format ) const

Returns the attachment descriptions for a render pass configuration.

Parameters
[in]multisample_countThe multisample count.
[in]is_grab_imageWhether this is for a grab image render pass.
[in]formatThe swap chain image format.
Returns
A buffer of VkAttachmentDescription structs.

◆ getSwapChainImageFormat()

VkFormat VulkanRenderDefinition::getSwapChainImageFormat ( ) const

Returns the swap chain image format.

Returns
The VkFormat.

◆ renderPass()

VkRenderPass VulkanRenderDefinition::renderPass ( uint04 multisample,
bool is_grab_image ) const

Returns the render pass for the given configuration.

Parameters
[in]multisampleThe multisample count.
[in]is_grab_imageWhether to return the grab image render pass.
Returns
The VkRenderPass handle.

◆ setDevice()

void VulkanRenderDefinition::setDevice ( const ConstPointer< VulkanDevice > & instance)

Sets the Vulkan device.

Parameters
[in]instanceThe Vulkan device.

◆ setSwapChainImageFormat()

void VulkanRenderDefinition::setSwapChainImageFormat ( VkFormat format)
inline

Sets the swap chain image format.

Parameters
[in]formatThe VkFormat.

Definition at line 73 of file VulkanRenderDefinition.h.

References m_swap_chain_image_format.


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