MayaFlux 0.4.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 506 of file ShaderProcessor.hpp.

507{
508 const auto size = sizeof(T);
509 static_assert(size <= 128, "Push constants typically limited to 128 bytes");
510 if (m_push_constant_data.size() < size) {
512 }
513
514 std::memcpy(m_push_constant_data.data(), &data, size);
515}
Range size
std::vector< uint8_t > m_push_constant_data
void set_push_constant_size()
Set push constant size from type.

References m_push_constant_data, set_push_constant_size(), and size.

Referenced by MayaFlux::Buffers::UVFieldProcessor::on_before_execute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: