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

◆ create_chimera() [1/2]

MAYAFLUX_API Kriya::ChimeraBuilder MayaFlux::create_chimera ( const Kakshya::VideoStreamSpec &  spec,
Portal::Graphics::RenderConfig  render,
std::optional< Portal::Graphics::FitMode >  fit = Portal::Graphics::FitMode::STRETCH 
)

Begin a Chimera over an array buffer made and drawn here.

The buffer is made from the spec and starts to render when start() runs, after the layers' params and layer_data() are in place. Show the window after this call.

auto chimera = MayaFlux::create_chimera(
{ .width = 1280, .height = 720, .ring_frames = 4 },
{ .target_window = window, .fragment_shader = "texture_array_ghost.frag" })
.layer_data()
.start();
std::weak_ptr< Core::Window > window
Definition Picker.cpp:23
static BufferOperation capture_to_stream(const std::shared_ptr< IO::IOManager > &io_manager, const IO::CameraConfig &config, uint64_t ring_frames=0, std::optional< Portal::Graphics::RenderConfig > live=std::nullopt, std::optional< Portal::Graphics::RenderConfig > display=std::nullopt)
Capture a camera straight into a dynamic video stream it creates.
ChimeraBuilder & record(BufferOperation &&operation)
Add an operation to the builder's pipeline, ahead of the feeding.
Definition Chimera.cpp:303
ChimeraBuilder & lag(double seconds)
Read the ring this many seconds behind its write head, at least two frames.
Definition Chimera.cpp:423
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
ChimeraBuilder & from_pipeline()
Feed the layer from the stream the pipeline records, read when start() runs.
Definition Chimera.cpp:335
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
Parameters
specExtent and format of every layer; ring_frames is the layer count.
renderHow the array is drawn.
fitHow a frame of another extent is fitted, or nullopt to drop it.
Returns
Builder.

Definition at line 172 of file Rigs.cpp.

176{
177 auto array = get_buffer_manager()->create_graphics_buffer<Buffers::TextureArrayBuffer>(
178 Buffers::ProcessingToken::GRAPHICS_BACKEND, spec, fit);
179
180 auto builder = create_chimera(std::move(array));
181 builder.render(std::move(render));
182 return builder;
183}
A TextureBuffer whose image is a stack of layers, composed in one draw.
std::shared_ptr< Buffers::BufferManager > get_buffer_manager()
Gets the buffer manager from the default engine.
Definition Graph.cpp:148

References create_chimera(), get_buffer_manager(), and MayaFlux::Buffers::GRAPHICS_BACKEND.

+ Here is the call graph for this function: