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

◆ set_push_constant_data()

template<typename T >
void MayaFlux::Buffers::ShaderProcessor::set_push_constant_data ( const T &  data)

Update push constant data (type-safe)

Template Parameters
TPush constant struct type
Parameters
dataPush constant data

Data is copied and uploaded during next process() call.

Definition at line 465 of file ShaderProcessor.hpp.

466{
467 const auto size = sizeof(T);
468 static_assert(size <= 128, "Push constants typically limited to 128 bytes");
469 if (m_push_constant_data.size() < size) {
471 }
472
473 std::memcpy(m_push_constant_data.data(), &data, size);
474}
std::vector< uint8_t > m_push_constant_data
void set_push_constant_size()
Set push constant size from type.

References m_push_constant_data, and set_push_constant_size().

+ Here is the call graph for this function: