LiteFX 0.3.1.2022
Computer Graphics Engine
LiteFX::Rendering::BufferAttribute Class Reference

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 ()
 Initializes an empty buffer attribute. More...
 
 BufferAttribute (const UInt32 &location, const UInt32 &offset, const BufferFormat &format, const AttributeSemantic &semantic, const UInt32 &semanticIndex=0)
 Initializes a new buffer attribute. More...
 
 BufferAttribute (BufferAttribute &&) noexcept
 
 BufferAttribute (const BufferAttribute &)
 
virtual ~BufferAttribute () noexcept
 
virtual const UInt32location () const noexcept
 Returns the location of the buffer attribute. More...
 
virtual const BufferFormat & format () const noexcept
 Returns the format of the buffer attribute. More...
 
virtual const UInt32offset () const noexcept
 Returns the offset of the buffer attribute. More...
 
virtual const AttributeSemantic & semantic () const noexcept
 Returns the semantic of the buffer attribute. More...
 
virtual const UInt32semanticIndex () const noexcept
 Returns the semantic index of the buffer attribute. More...
 

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 ( )

Initializes an empty buffer attribute.

◆ BufferAttribute() [2/4]

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

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 ( BufferAttribute &&  _other)
noexcept

◆ BufferAttribute() [4/4]

BufferAttribute::BufferAttribute ( const BufferAttribute _other)

◆ ~BufferAttribute()

BufferAttribute::~BufferAttribute ( )
virtualdefaultnoexcept

Member Function Documentation

◆ format()

const BufferFormat & BufferAttribute::format ( ) const
virtualnoexcept

Returns the format of the buffer attribute.

Returns
The format of the buffer attribute.

◆ location()

const 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()

const UInt32 & BufferAttribute::offset ( ) const
virtualnoexcept

Returns the offset of the buffer attribute.

Returns
The offset of the buffer attribute.

◆ semantic()

const 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()

const 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