Skip to content

LiteFX::Rendering::Backends::DirectX12VertexBufferLayoutBuilder::withAttribute

Adds an attribute to the vertex buffer layout.

Synopses

Declared in <litefx/rendering_builders.hpp>

Adds an attribute to the vertex buffer layout.

template<typename TSelf>
[[nodiscard]] constexpr TSelf&& withAttribute(this 
    TSelf&& self,
    BufferAttribute&& attribute);

» more...

Adds an attribute to the vertex buffer layout.

template<typename TSelf>
[[nodiscard]] constexpr TSelf&& withAttribute(this 
    TSelf&& self,
    BufferFormat format,
    UInt32 offset,
    AttributeSemantic semantic = AttributeSemantic::Arbitrary,
    UInt32 semanticIndex = 0);

» more...

Adds an attribute to the vertex buffer layout.

template<typename TSelf>
[[nodiscard]] constexpr TSelf&& withAttribute(this 
    TSelf&& self,
    UInt32 location,
    BufferFormat format,
    UInt32 offset,
    AttributeSemantic semantic = AttributeSemantic::Arbitrary,
    UInt32 semanticIndex = 0);

» more...

Return Value

Note

The return value should not be discarded.

Parameters

NameDescription
attributeThe attribute to add to the layout.
formatThe format of the attribute.
offsetThe offset of the attribute within a buffer element.
semanticThe semantic of the attribute.
semanticIndexThe semantic index of the attribute.
locationThe location, the attribute is bound to.