Begin assembling the layers of a TextureArrayBuffer from what feeds each.
A layer holds a still image or file, a GPU image copied every frame, or a moment of a ring that is being recorded, read at a lag or played freely. start() begins feeding on the frame clock. Keep the resulting Chimera alive for as long as it should run.
ChimeraBuilder & params(const glm::vec4 &values)
Params for the layer in the buffer's per-layer data, such as placement.
ChimeraBuilder & lag(double seconds)
Read the ring this many seconds behind its write head, at least two frames.
ChimeraBuilder & level(double weight)
Weight passed to the shader for the layer.
ChimeraBuilder & smooth(bool enable=true)
Blend the two frames around a ring position, so slow or varying time does not step.
ChimeraBuilder & from(std::shared_ptr< Kakshya::DynamicVideoStream > ring)
Feed the layer from a ring that is being recorded.
ChimeraBuilder & layer()
Open the next layer.
Chimera start()
Start feeding every declared layer on the frame clock.
Kriya::ChimeraBuilder create_chimera(std::shared_ptr< Buffers::TextureArrayBuffer > buffer)
Begin assembling the layers of a TextureArrayBuffer from what feeds each.
The builder comes with a pipeline made from the engine's managers. Reach it with get_pipeline(), replace it with use_pipeline(), or record into it with record() and read its stream with from_pipeline().
- Parameters
-
| buffer | Array buffer whose layers are fed. |
- Returns
- Builder. A null buffer makes start() return an empty Chimera.
Definition at line 167 of file Rigs.cpp.
168{
170}
std::shared_ptr< NetworkGeometryBuffer > buffer
Declares the layers of a Chimera, in order, and starts feeding them.
std::shared_ptr< Kriya::BufferPipeline > create_buffer_pipeline()
Creates a new buffer pipeline instance.
std::shared_ptr< IO::IOManager > get_io_manager()
Retrieves the global IOManager instance for file loading and buffer management.
References buffer, create_buffer_pipeline(), and get_io_manager().
Referenced by create_chimera().