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

◆ bind_push_constant() [3/4]

template<typename T >
void MayaFlux::Buffers::FormaBindingsProcessor::bind_push_constant ( const std::string &  name,
std::shared_ptr< Portal::Forma::MappedState< T > >  state,
std::function< float(T)>  project,
uint32_t  offset,
Kakshya::GpuDataFormat  format 
)
inline

Bind a MappedState<T> to a push constant slot described by a GpuDataFormat.

Parameters
formatLayout written at the offset.
Template Parameters
TMappedState value type.

Definition at line 194 of file FormaBindingsProcessor.hpp.

200 {
201 if (!state) {
203 "FormaBindingsProcessor::bind_push_constant: null state for '{}'", name);
204 return;
205 }
206
208 name,
209 std::function<float()>([s = std::move(state), p = std::move(project)]() {
210 return p(s->value);
211 }),
212 offset, format);
213 }
#define MF_ERROR(comp, ctx,...)
uint64_t offset
Definition Composite.cpp:10
bool format
std::string name
Definition VKDevice.cpp:123
void bind_push_constant(const std::string &name, std::function< float()> reader, uint32_t offset, size_t size=sizeof(float))
Bind a type-erased reader to a push constant slot.
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.

References format, MF_ERROR, name, and offset.