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

◆ RelaxationGridBuffer() [2/2]

MayaFlux::Buffers::RelaxationGridBuffer::RelaxationGridBuffer ( const GridConfig &  config)
explicit

Construct from a GridConfig.

Parameters
configGrid arrangement.
Exceptions
std::invalid_argumentWhen a path stage declares no state, when rule and emit disagree on the cell format, or when the format is a three component vector, whose std430 array stride (16 bytes) differs from gpu_data_format_bytes.

Derives the cell stride from the stage format and delegates to the positional constructor.

Definition at line 121 of file RelaxationGridBuffer.cpp.

123 config.width, config.height, resolve_stride(config),
124 config.rule.shader, config.emit.shader)
125{
126 m_rule_constants = config.rule.constants;
127 m_emit_constants = config.emit.constants;
128 m_extent = config.extent;
129 m_point_size = config.point_size;
130}
std::vector< GridConfig::Constant > m_rule_constants
Rule constants from GridConfig, written at setup_processors.
std::vector< GridConfig::Constant > m_emit_constants
Emit constants from GridConfig, written at setup_processors.
RelaxationGridBuffer(uint32_t width, uint32_t height, size_t cell_stride_bytes, ShaderSource rule_source, ShaderSource emit_source)
Construct an unregistered double-buffered grid buffer.
float m_extent
Emit extent applied at setup_processors.
float m_point_size
Emit point size applied at setup_processors.

References MayaFlux::Buffers::RelaxationGridBuffer::GridConfig::Stage::constants, MayaFlux::Buffers::RelaxationGridBuffer::GridConfig::emit, MayaFlux::Buffers::RelaxationGridBuffer::GridConfig::extent, m_emit_constants, m_extent, m_point_size, m_rule_constants, MayaFlux::Buffers::RelaxationGridBuffer::GridConfig::point_size, and MayaFlux::Buffers::RelaxationGridBuffer::GridConfig::rule.