MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ declare_scalar()

ScalarRef MayaFlux::Buffers::VolumeGridBuffer::declare_scalar ( std::string  name,
Kinesis::LatticeSemantics  semantics = {} 
)

Declare a double-buffered scalar field.

Parameters
nameLookup key, unique within this volume.
semanticsWhat the values mean. Carried for consumers that resample or write the field; nothing in this class reads it.
Returns
Ref naming the field, or a ref with an empty name if the declaration was rejected.

Definition at line 165 of file VolumeGridBuffer.cpp.

166{
167 if (!allocate_field(name, sizeof(float), true, semantics)) {
168 return {};
169 }
170
171 return ScalarRef {
172 .name = std::move(name),
173 .owner = std::dynamic_pointer_cast<VolumeGridBuffer>(shared_from_this()),
174 };
175}
std::string name
Definition VKDevice.cpp:123
bool allocate_field(const std::string &name, size_t stride_bytes, bool double_buffered)
Allocate one field's slots and register it.

References allocate_field(), MayaFlux::Buffers::ScalarRef::name, and name.

+ Here is the call graph for this function: