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

Implements a DirectX 12 IDescriptorLayout More...

#include <dx12.hpp>

Inherits LiteFX::Rendering::IDescriptorLayout.

Classes

class  DirectX12DescriptorLayoutImpl
 

Public Member Functions

 DirectX12DescriptorLayout (const DescriptorType &type, const UInt32 &binding, const size_t &elementSize, const UInt32 &descriptors=1)
 Initializes a new DirectX 12 descriptor layout. More...
 
 DirectX12DescriptorLayout (UniquePtr< IDirectX12Sampler > &&staticSampler, const UInt32 &binding)
 Initializes a new DirectX 12 descriptor layout for a static sampler. More...
 
 DirectX12DescriptorLayout (DirectX12DescriptorLayout &&)=delete
 
 DirectX12DescriptorLayout (const DirectX12DescriptorLayout &)=delete
 
virtual ~DirectX12DescriptorLayout () 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 IDirectX12SamplerstaticSampler () 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

◆ DirectX12DescriptorLayout() [1/4]

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

Initializes a new DirectX 12 descriptor layout.

Parameters
typeThe type of the descriptor.
bindingThe binding point for the descriptor.
elementSizeThe size of the descriptor.
elementSizeThe number of descriptors in the descriptor array.

◆ DirectX12DescriptorLayout() [2/4]

DirectX12DescriptorLayout::DirectX12DescriptorLayout ( UniquePtr< IDirectX12Sampler > &&  staticSampler,
const UInt32 binding 
)
explicit

Initializes a new DirectX 12 descriptor layout for a static sampler.

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

◆ DirectX12DescriptorLayout() [3/4]

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

◆ DirectX12DescriptorLayout() [4/4]

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

◆ ~DirectX12DescriptorLayout()

DirectX12DescriptorLayout::~DirectX12DescriptorLayout ( )
virtualdefaultnoexcept

Member Function Documentation

◆ binding()

const UInt32 & DirectX12DescriptorLayout::binding ( ) const
overridevirtualnoexcept

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

Implements LiteFX::Rendering::IBufferLayout.

◆ descriptors()

const UInt32 & DirectX12DescriptorLayout::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 & DirectX12DescriptorLayout::descriptorType ( ) const
overridevirtualnoexcept

Returns the type of the descriptor.

Implements LiteFX::Rendering::IDescriptorLayout.

◆ elementSize()

size_t DirectX12DescriptorLayout::elementSize ( ) const
overridevirtualnoexcept

Returns the size of a single element within the buffer.

Implements LiteFX::Rendering::IBufferLayout.

◆ staticSampler()

const IDirectX12Sampler * DirectX12DescriptorLayout::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 & DirectX12DescriptorLayout::type ( ) const
overridevirtualnoexcept

Returns the buffer type of the buffer.

Implements LiteFX::Rendering::IBufferLayout.