Stream Format is describing how to feed a list of attributes from a bunch of stream buffer channels.
More...
#include <Stream.h>
|
|
AttributeMap | _attributes |
| | Attributes mapped to slots.
|
| |
|
ChannelMap | _channels |
| | Channels mapped to binding indices.
|
| |
|
uint32 | _elementTotalSize { 0 } |
| | Sum of the size of all attributes in bytes.
|
| |
|
std::string | _key |
| | String uniquely describing a format. Automatically updated when adding attributes.
|
| |
Stream Format is describing how to feed a list of attributes from a bunch of stream buffer channels.
◆ evaluateCache()
| void Stream::Format::evaluateCache |
( |
| ) |
|
|
protected |
Updates key, channel map and total size. Automatically called when adding attributes.
◆ getAttribute()
Attribute object with default constructor if there's no attribute at the given slot.
- Parameters
-
| slot | Slot index to get attribute from. |
- Returns
- Attribute at a given slot.
◆ getAttributes()
| const AttributeMap& gpu::Stream::Format::getAttributes |
( |
| ) |
const |
|
inline |
- Returns
- Attributes mapped to slots.
◆ getChannels()
| const ChannelMap& gpu::Stream::Format::getChannels |
( |
| ) |
const |
|
inline |
- Returns
- Channels this format.
◆ getChannelStride()
| Offset gpu::Stream::Format::getChannelStride |
( |
Slot |
channel | ) |
const |
|
inline |
- Parameters
-
| channel | Binding number for a given data source. |
- Returns
- Stride for a channel in a given binding location.
◆ getElementTotalSize()
| size_t gpu::Stream::Format::getElementTotalSize |
( |
| ) |
const |
|
inline |
◆ getKey()
| const std::string& gpu::Stream::Format::getKey |
( |
| ) |
const |
|
inline |
- Returns
- Gets a string uniquely representing this format.
◆ getNumAttributes()
| size_t gpu::Stream::Format::getNumAttributes |
( |
| ) |
const |
|
inline |
- Returns
- Number of attributes for this format.
◆ getNumChannels()
| size_t gpu::Stream::Format::getNumChannels |
( |
| ) |
const |
|
inline |
- Returns
- Number of channels for this format.
◆ hasAttribute()
| bool gpu::Stream::Format::hasAttribute |
( |
Slot |
slot | ) |
const |
|
inline |
- Parameters
-
- Returns
- Returns true if there's an attribute on a given slot.
◆ setAttribute()
| bool Stream::Format::setAttribute |
( |
Slot |
slot, |
|
|
Slot |
channel, |
|
|
Element |
element, |
|
|
Offset |
offset = 0, |
|
|
Frequency |
frequency = PER_VERTEX |
|
) |
| |
Sets attribute in a format.
After adding attribute calls evaluateCache() to update channels map.
- Parameters
-
| slot | Slot at which data will be available to the shader. |
| channel | Binding number for a given data source. |
| element | Object containing information about the element type of this attribute. |
| offset | Offset in bytes for the given element. |
| frequency | How often data position is incremented. Must be the same for entire channel. |
- Returns
- Always returns true currently.
The documentation for this class was generated from the following files: