LiteFX 0.4.1.2025
Computer Graphics Engine
Loading...
Searching...
No Matches
LiteFX::Rendering::BufferAttribute Class Referencefinal

Stores meta data about a buffer attribute, i.e. a member or field of a descriptor or buffer. More...

#include <rendering_api.hpp>

Classes

class  BufferAttributeImpl
 

Public Member Functions

 BufferAttribute () noexcept
 Initializes an empty buffer attribute.
 
 BufferAttribute (UInt32 location, UInt32 offset, BufferFormat format, AttributeSemantic semantic, UInt32 semanticIndex=0) noexcept
 Initializes a new buffer attribute.
 
 BufferAttribute (const BufferAttribute &_other)
 Creates a copy of a buffer attribute.
 
 BufferAttribute (BufferAttribute &&_other) noexcept
 Takes over another instance of a buffer attribute.
 
BufferAttributeoperator= (const BufferAttribute &_other)
 Assigns a buffer attribute by copying it.
 
BufferAttributeoperator= (BufferAttribute &&_other) noexcept
 Assigns a buffer attribute by taking it over.
 
virtual ~BufferAttribute () noexcept
 Releases the buffer attribute instance.
 
virtual UInt32 location () const noexcept
 Returns the location of the buffer attribute.
 
virtual BufferFormat format () const noexcept
 Returns the format of the buffer attribute.
 
virtual UInt32 offset () const noexcept
 Returns the offset of the buffer attribute.
 
virtual AttributeSemantic semantic () const noexcept
 Returns the semantic of the buffer attribute.
 
virtual UInt32 semanticIndex () const noexcept
 Returns the semantic index of the buffer attribute.
 

Detailed Description

Stores meta data about a buffer attribute, i.e. a member or field of a descriptor or buffer.

Constructor & Destructor Documentation

◆ BufferAttribute() [1/4]

BufferAttribute::BufferAttribute ( )
noexcept

Initializes an empty buffer attribute.

◆ BufferAttribute() [2/4]

BufferAttribute::BufferAttribute ( UInt32 location,
UInt32 offset,
BufferFormat format,
AttributeSemantic semantic,
UInt32 semanticIndex = 0 )
noexcept

Initializes a new buffer attribute.

Parameters
locationThe location the buffer attribute is bound to.
offsetThe offset of the attribute relative to the buffer.
formatThe format of the buffer attribute.
semanticThe semantic of the buffer attribute.
semanticIndexThe semantic index of the buffer attribute.

◆ BufferAttribute() [3/4]

BufferAttribute::BufferAttribute ( const BufferAttribute & _other)
default

Creates a copy of a buffer attribute.

Parameters
_otherThe buffer attribute instance to copy.

◆ BufferAttribute() [4/4]

BufferAttribute::BufferAttribute ( BufferAttribute && _other)
defaultnoexcept

Takes over another instance of a buffer attribute.

Parameters
_otherThe buffer attribute instance to take over.

◆ ~BufferAttribute()

BufferAttribute::~BufferAttribute ( )
virtualdefaultnoexcept

Releases the buffer attribute instance.

Member Function Documentation

◆ format()

BufferFormat BufferAttribute::format ( ) const
virtualnoexcept

Returns the format of the buffer attribute.

Returns
The format of the buffer attribute.

◆ location()

UInt32 BufferAttribute::location ( ) const
virtualnoexcept

Returns the location of the buffer attribute.

Locations can only be specified in Vulkan and are implicitly generated based on semantics for DirectX. However, it is a good practice to provide them anyway.

Returns
The location of the buffer attribute.

◆ offset()

UInt32 BufferAttribute::offset ( ) const
virtualnoexcept

Returns the offset of the buffer attribute.

Returns
The offset of the buffer attribute.

◆ operator=() [1/2]

BufferAttribute & BufferAttribute::operator= ( BufferAttribute && _other)
defaultnoexcept

Assigns a buffer attribute by taking it over.

Parameters
_otherThe buffer attribute to take over.
Returns
A reference to the current buffer attribute instance.

◆ operator=() [2/2]

BufferAttribute & BufferAttribute::operator= ( const BufferAttribute & _other)
default

Assigns a buffer attribute by copying it.

Parameters
_otherThe buffer attribute instance to copy.
Returns
A reference to the current buffer attribute instance.

◆ semantic()

AttributeSemantic BufferAttribute::semantic ( ) const
virtualnoexcept

Returns the semantic of the buffer attribute.

Semantics are only used in DirectX and HLSL, however it is a good practice to provide them anyway.

Returns
The semantic of the buffer attribute.
See also
semanticIndex

◆ semanticIndex()

UInt32 BufferAttribute::semanticIndex ( ) const
virtualnoexcept

Returns the semantic index of the buffer attribute.

Semantics are only used in DirectX and HLSL, however it is a good practice to provide them anyway.

Returns
The semantic index of the buffer attribute.
See also
semantic