A datastructure for creating interleaved data for Mesh with a specifc format (BufferLayout)
More...
#include <Buffer.h>
|
std::string | Name |
| A name for vertex data, created by interleaving of various attributes.
|
|
uint64_t | Offset |
| The location (offset) of this element in the vertex or index data set.
|
|
uint32_t | Size |
| The size of this element.
|
|
ShaderDataType | Type |
| The type of the attribute.
|
|
bool | Normalized |
|
A datastructure for creating interleaved data for Mesh with a specifc format (BufferLayout)
◆ BufferElement()
Karma::BufferElement::BufferElement |
( |
ShaderDataType | type, |
|
|
const std::string & | name, |
|
|
bool | normalized = false, |
|
|
uint64_t | offset = 0 ) |
|
inline |
A constructor.
- Parameters
-
type | One of the defined ShaderDataType |
name | name of the attribute (MeshAttribute) |
normalized | For glVertexAttribPointer, if normalized is set to true, it indicates that values stored in an integer format are to be mapped to the range [-1,1] (for signed values) or [0,1] (for unsigned values) when they are accessed and converted to floating point. Otherwise, values will be converted to floats directly without normalization |
offset | The amount of gap to be left, for instance in vertexarray |
- Todo
- Think about vulkan needs of normalized parameter, with opengl in context, and try to abstract accordingly. Also may need to think about the custom default offsets
- Since
- Karma 1.0.0
◆ GetComponentCount()
uint32_t Karma::BufferElement::GetComponentCount |
( |
| ) |
const |
|
inline |
Routine to compute number of components of this element.
- Since
- Karma 1.0.0
◆ Name
std::string Karma::BufferElement::Name |
A name for vertex data, created by interleaving of various attributes.
- See also
- MeshAttribute
- Since
- Karma 1.0.0
◆ Offset
uint64_t Karma::BufferElement::Offset |
The location (offset) of this element in the vertex or index data set.
- See also
- CalculateOffsetsAndStride()
- Since
- Karma 1.0.0
◆ Size
uint32_t Karma::BufferElement::Size |
The size of this element.
- See also
- ShaderDataTypeSize
-
CalculateOffsetsAndBufferSize
- Since
- Karma 1.0.0
◆ Type
The type of the attribute.
- Since
- Karma 1.0.0
The documentation for this struct was generated from the following file: