LiteFX::Rendering::Backends::VulkanVertexBufferLayoutBuilder::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);
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);
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);
Return Value¶
Note
The return value should not be discarded.
Parameters¶
| Name | Description |
|---|---|
| attribute | The attribute to add to the layout. |
| format | The format of the attribute. |
| offset | The offset of the attribute within a buffer element. |
| semantic | The semantic of the attribute. |
| semanticIndex | The semantic index of the attribute. |
| location | The location, the attribute is bound to. |