CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::GPUVertexFormat Struct Referencefinal

#include <CeresEngine/RenderAPI/GPUVertexFormat.hpp>

Public Member Functions

 GPUVertexFormat () noexcept=default
 
 GPUVertexFormat (const GPUVertexFormat &)=default
 
GPUVertexFormatoperator= (const GPUVertexFormat &)=default
 
 GPUVertexFormat (std::initializer_list< GPUVertexAttribute > &&aAttributesList, const UInt32 inputSlot=0) noexcept
 Create a new VertexFormat from a vector of attributes.
 
template<typename BeginIterator , typename EndIterator >
 GPUVertexFormat (const BeginIterator &begin, const EndIterator &end, const UInt32 inputSlot=0) noexcept
 Create a new VertexFormat from a vector of attributes.
 

Static Public Member Functions

template<typename Processor >
static constexpr void reflect (Processor &&RTTI)
 Executes the given processor for every field of the struct.
 

Public Attributes

SmallVector< GPUVertexAttribute, 6 > attributes
 Specifies the list of vertex attributes.
 
UInt32 stride = 0
 Specifies the vertex data stride (or format size) which describes the byte offset between consecutive vertices.
 
UInt32 inputSlot = 0
 Vertex buffer input slot.
 
GPUVertexInputRate inputRate = GPUVertexInputRate::Vertex
 Specifies that vertex attribute addressing is a function of the instance index.
 

Friends

bool operator== (const GPUVertexFormat &lhs, const GPUVertexFormat &rhs)
 Compares two VertexFormat instances for equality.
 
bool operator!= (const GPUVertexFormat &lhs, const GPUVertexFormat &rhs)
 Compares two VertexFormat instances for inequality.
 

Constructor & Destructor Documentation

◆ GPUVertexFormat() [1/4]

CeresEngine::GPUVertexFormat::GPUVertexFormat ( )
defaultnoexcept

◆ GPUVertexFormat() [2/4]

CeresEngine::GPUVertexFormat::GPUVertexFormat ( const GPUVertexFormat )
default

◆ GPUVertexFormat() [3/4]

CeresEngine::GPUVertexFormat::GPUVertexFormat ( std::initializer_list< GPUVertexAttribute > &&  aAttributesList,
const UInt32  inputSlot = 0 
)
inlinenoexcept

Create a new VertexFormat from a vector of attributes.

Parameters
aAttributesListThe vector attributes
inputSlotThe vertex input slot

◆ GPUVertexFormat() [4/4]

CeresEngine::GPUVertexFormat::GPUVertexFormat ( const BeginIterator begin,
const EndIterator end,
const UInt32  inputSlot = 0 
)
inlineexplicitnoexcept

Create a new VertexFormat from a vector of attributes.

Parameters
aAttributesListThe vector attributes
inputSlotThe vertex input slot

Member Function Documentation

◆ operator=()

GPUVertexFormat & CeresEngine::GPUVertexFormat::operator= ( const GPUVertexFormat )
default

◆ reflect()

template<typename Processor >
static constexpr void CeresEngine::GPUVertexFormat::reflect ( Processor &&  RTTI)
inlinestaticconstexpr

Executes the given processor for every field of the struct.

Parameters
RTTIThe processor to be ran for every field.

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const GPUVertexFormat lhs,
const GPUVertexFormat rhs 
)
friend

Compares two VertexFormat instances for inequality.

Parameters
lhsThe left-handside operand
rhsThe right-handside operand
Returns
true if any members of lhs is not equal equal to rhs

◆ operator==

bool operator== ( const GPUVertexFormat lhs,
const GPUVertexFormat rhs 
)
friend

Compares two VertexFormat instances for equality.

Parameters
lhsThe left-handside operand
rhsThe right-handside operand
Returns
true if all members of lhs are equal to rhs

Member Data Documentation

◆ attributes

SmallVector<GPUVertexAttribute, 6> CeresEngine::GPUVertexFormat::attributes

Specifies the list of vertex attributes.

◆ inputRate

GPUVertexInputRate CeresEngine::GPUVertexFormat::inputRate = GPUVertexInputRate::Vertex

Specifies that vertex attribute addressing is a function of the instance index.

◆ inputSlot

UInt32 CeresEngine::GPUVertexFormat::inputSlot = 0

Vertex buffer input slot.

By default 0.

Remarks
This is used when multiple vertex buffers are used simultaneously.
Note
Only supported with: Direct3D 11, Direct3D 12, Vulkan.
For OpenGL, the input slots are automatically generated in ascending order and beginning with zero.

◆ stride

UInt32 CeresEngine::GPUVertexFormat::stride = 0

Specifies the vertex data stride (or format size) which describes the byte offset between consecutive vertices.


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