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

◆ start()

void MayaFlux::Core::GraphicsSubsystem::start ( )
overridevirtual

Start the subsystem's processing/event loops.

Begins active processing. After this call, the subsystem should be actively responding to callbacks and processing data according to its domain requirements.

Implements MayaFlux::Core::ISubsystem.

Definition at line 166 of file GraphicsSubsystem.cpp.

167{
168 if (m_running.load(std::memory_order_acquire)) {
170 "Graphics thread already running!");
171 return;
172 }
173
174 m_running.store(true);
175 m_paused.store(false, std::memory_order_release);
176
177 m_frame_clock->reset();
178
179 m_graphics_thread = std::thread([this]() {
180 m_graphics_thread_id = std::this_thread::get_id();
181
183 "Graphics thread started (ID: {}, Target FPS: {})",
184 std::hash<std::thread::id> {}(m_graphics_thread_id),
185 m_frame_clock->frame_rate());
186
187 try {
189 } catch (const std::exception& e) {
193 std::source_location::current(),
194 "Graphics thread error");
195 }
196
198 "Graphics thread stopped.");
199 });
200}
#define MF_INFO(comp, ctx,...)
#define MF_WARN(comp, ctx,...)
void graphics_thread_loop()
Graphics thread main loop.
std::shared_ptr< Vruta::FrameClock > m_frame_clock
@ GraphicsSubsystem
Graphics subsystem operations (Vulkan, rendering pipeline)
void error_rethrow(Component component, Context context, std::source_location location=std::source_location::current(), std::string_view additional_context="")
Catch and log an exception, then rethrow it.
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, graphics_thread_loop(), MayaFlux::Journal::GraphicsSubsystem, m_frame_clock, m_graphics_thread, m_graphics_thread_id, m_paused, m_running, MF_INFO, and MF_WARN.

+ Here is the call graph for this function: