MayaFlux 0.3.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 479 of file ShaderProcessor.hpp.

480{
481 const auto size = sizeof(T);
482 static_assert(size <= 128, "Push constants typically limited to 128 bytes");
483 if (m_push_constant_data.size() < size) {
485 }
486
487 std::memcpy(m_push_constant_data.data(), &data, size);
488}
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: