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

◆ create_chimera() [2/2]

MAYAFLUX_API Kriya::ChimeraBuilder MayaFlux::create_chimera ( std::shared_ptr< Buffers::TextureArrayBuffer >  buffer)

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.

auto chimera = MayaFlux::create_chimera(array)
.layer().from("res/eye.png").params({ 0.3F, 0.4F, 0.2F, 0.F })
.layer().from(ring).lag(0.5).smooth().level(0.6)
.start();
ChimeraBuilder & params(const glm::vec4 &values)
Params for the layer in the buffer's per-layer data, such as placement.
Definition Chimera.cpp:458
ChimeraBuilder & lag(double seconds)
Read the ring this many seconds behind its write head, at least two frames.
Definition Chimera.cpp:423
ChimeraBuilder & level(double weight)
Weight passed to the shader for the layer.
Definition Chimera.cpp:464
ChimeraBuilder & smooth(bool enable=true)
Blend the two frames around a ring position, so slow or varying time does not step.
Definition Chimera.cpp:440
ChimeraBuilder & from(std::shared_ptr< Kakshya::DynamicVideoStream > ring)
Feed the layer from a ring that is being recorded.
Definition Chimera.cpp:360
ChimeraBuilder & layer()
Open the next layer.
Definition Chimera.cpp:354
Chimera start()
Start feeding every declared layer on the frame clock.
Definition Chimera.cpp:470
Kriya::ChimeraBuilder create_chimera(std::shared_ptr< Buffers::TextureArrayBuffer > buffer)
Begin assembling the layers of a TextureArrayBuffer from what feeds each.
Definition Rigs.cpp:167

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
bufferArray 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.
Definition Chimera.hpp:190
std::shared_ptr< Kriya::BufferPipeline > create_buffer_pipeline()
Creates a new buffer pipeline instance.
Definition Chronie.cpp:137
std::shared_ptr< IO::IOManager > get_io_manager()
Retrieves the global IOManager instance for file loading and buffer management.
Definition Depot.cpp:575

References buffer, create_buffer_pipeline(), and get_io_manager().

Referenced by create_chimera().

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