LiteFX 0.3.1.2022
Computer Graphics Engine
LiteFX::Rendering::Backends::VulkanDescriptorLayout Class Reference

Implements a Vulkan IDescriptorLayout More...

#include <vulkan.hpp>

Inherits LiteFX::Rendering::IDescriptorLayout.

Classes

class  VulkanDescriptorLayoutImpl
 

Public Member Functions

 VulkanDescriptorLayout (const DescriptorType &type, const UInt32 &binding, const size_t &elementSize, const UInt32 &descriptors=1)
 Initializes a new Vulkan descriptor layout. More...
 
 VulkanDescriptorLayout (UniquePtr< IVulkanSampler > &&staticSampler, const UInt32 &binding)
 Initializes a new Vulkan descriptor layout for a static sampler. More...
 
 VulkanDescriptorLayout (VulkanDescriptorLayout &&)=delete
 
 VulkanDescriptorLayout (const VulkanDescriptorLayout &)=delete
 
virtual ~VulkanDescriptorLayout () noexcept
 
virtual const DescriptorType & descriptorType () const noexcept override
 Returns the type of the descriptor. More...
 
virtual const UInt32descriptors () const noexcept override
 Returns the number of descriptors in the descriptor array, or -1 if the array is unbounded. More...
 
virtual const IVulkanSamplerstaticSampler () const noexcept override
 If the descriptor describes a static sampler, this method returns the state of the sampler. Otherwise, it returns nullptr. More...
 
virtual size_t elementSize () const noexcept override
 Returns the size of a single element within the buffer. More...
 
virtual const UInt32binding () const noexcept override
 Returns the binding point, the buffer will be bound to. More...
 
virtual const BufferType & type () const noexcept override
 Returns the buffer type of the buffer. More...
 
- Public Member Functions inherited from LiteFX::Rendering::IDescriptorLayout
virtual ~IDescriptorLayout () noexcept=default
 
virtual const DescriptorType & descriptorType () const noexcept=0
 Returns the type of the descriptor. More...
 
virtual const UInt32descriptors () const noexcept=0
 Returns the number of descriptors in the descriptor array, or -1 if the array is unbounded. More...
 
virtual const ISamplerstaticSampler () const noexcept=0
 If the descriptor describes a static sampler, this method returns the state of the sampler. Otherwise, it returns nullptr. More...
 
- Public Member Functions inherited from LiteFX::Rendering::IBufferLayout
virtual ~IBufferLayout () noexcept=default
 
virtual size_t elementSize () const noexcept=0
 Returns the size of a single element within the buffer. More...
 
virtual const UInt32binding () const noexcept=0
 Returns the binding point, the buffer will be bound to. More...
 
virtual const BufferType & type () const noexcept=0
 Returns the buffer type of the buffer. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ VulkanDescriptorLayout() [1/4]

VulkanDescriptorLayout::VulkanDescriptorLayout ( const DescriptorType &  type,
const UInt32 binding,
const size_t &  elementSize,
const UInt32 descriptors = 1 
)
explicit

Initializes a new Vulkan descriptor layout.

Parameters
typeThe type of the descriptor.
bindingThe binding point for the descriptor.
elementSizeThe size of the descriptor.
descriptorsThe number of descriptors in the descriptor array. If set to -1, the descriptor will be unbounded.
See also
descriptors

◆ VulkanDescriptorLayout() [2/4]

VulkanDescriptorLayout::VulkanDescriptorLayout ( UniquePtr< IVulkanSampler > &&  staticSampler,
const UInt32 binding 
)
explicit

Initializes a new Vulkan descriptor layout for a static sampler.

Parameters
staticSamplerThe static sampler to initialize the state with.
bindingThe binding point for the descriptor.

◆ VulkanDescriptorLayout() [3/4]

LiteFX::Rendering::Backends::VulkanDescriptorLayout::VulkanDescriptorLayout ( VulkanDescriptorLayout &&  )
delete

◆ VulkanDescriptorLayout() [4/4]

LiteFX::Rendering::Backends::VulkanDescriptorLayout::VulkanDescriptorLayout ( const VulkanDescriptorLayout )
delete

◆ ~VulkanDescriptorLayout()

VulkanDescriptorLayout::~VulkanDescriptorLayout ( )
virtualdefaultnoexcept

Member Function Documentation

◆ binding()

const UInt32 & VulkanDescriptorLayout::binding ( ) const
overridevirtualnoexcept

Returns the binding point, the buffer will be bound to.

Implements LiteFX::Rendering::IBufferLayout.

◆ descriptors()

const UInt32 & VulkanDescriptorLayout::descriptors ( ) const
overridevirtualnoexcept

Returns the number of descriptors in the descriptor array, or -1 if the array is unbounded.

Implements LiteFX::Rendering::IDescriptorLayout.

◆ descriptorType()

const DescriptorType & VulkanDescriptorLayout::descriptorType ( ) const
overridevirtualnoexcept

Returns the type of the descriptor.

Implements LiteFX::Rendering::IDescriptorLayout.

◆ elementSize()

size_t VulkanDescriptorLayout::elementSize ( ) const
overridevirtualnoexcept

Returns the size of a single element within the buffer.

Implements LiteFX::Rendering::IBufferLayout.

◆ staticSampler()

const IVulkanSampler * VulkanDescriptorLayout::staticSampler ( ) const
overridevirtualnoexcept

If the descriptor describes a static sampler, this method returns the state of the sampler. Otherwise, it returns nullptr.

Implements LiteFX::Rendering::IDescriptorLayout.

◆ type()

const BufferType & VulkanDescriptorLayout::type ( ) const
overridevirtualnoexcept

Returns the buffer type of the buffer.

Implements LiteFX::Rendering::IBufferLayout.