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

◆ initialize()

MAYAFLUX_API bool MayaFlux::Portal::Forma::initialize ( std::shared_ptr< Nodes::NodeGraphManager node_graph_manager,
std::shared_ptr< Buffers::BufferManager buffer_manager,
std::shared_ptr< Vruta::TaskScheduler scheduler,
std::shared_ptr< Vruta::EventManager event_manager,
std::shared_ptr< Core::WindowManager window_manager 
)

Store engine-level references for use by all subsequent Forma calls.

Must be called before any create_* call. Safe to call multiple times; subsequent calls are no-ops and log a warning.

Parameters
node_graph_managerEngine NodeGraphManager. Must outlive all Forma objects.
buffer_managerEngine BufferManager. Must outlive all Forma objects.
schedulerEngine TaskScheduler. Must outlive all Bridge instances.
event_managerEngine EventManager. Must outlive all Context instances.
window_managerEngine WindowManager. Must outlive all Surface instances.
Returns
True on success, false if any argument is null.

Definition at line 132 of file Forma.cpp.

138{
139 if (g_initialized) {
140 MF_WARN(Journal::Component::Portal, Journal::Context::API,
141 "Portal::Forma already initialized");
142 return true;
143 }
144
145 g_node_graph_manager = std::move(node_graph_manager);
146 g_buffer_manager = std::move(buffer_manager);
147 g_scheduler = std::move(scheduler);
148 g_event_manager = std::move(event_manager);
149 g_window_manager = std::move(window_manager);
150 g_bridge = std::make_unique<Bridge>(*g_scheduler, *g_buffer_manager);
151 g_inspect = std::make_unique<Inspector>(*g_node_graph_manager, *g_buffer_manager, *g_scheduler, *g_event_manager);
152 g_initialized = true;
153
154 MF_INFO(Journal::Component::Portal, Journal::Context::API,
155 "Portal::Forma initialized");
156 return true;
157}
#define MF_INFO(comp, ctx,...)
#define MF_WARN(comp, ctx,...)

References MayaFlux::Journal::API, MF_INFO, MF_WARN, and MayaFlux::Journal::Portal.

Referenced by MayaFlux::Core::Engine::Start().

+ Here is the caller graph for this function: