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

◆ Await()

MAYAFLUX_API void MayaFlux::Await ( )

Blocks launcher until user input (optional convenience function)

Use this only in launcher applications that need to block the main thread until shutdown is requested.

On macOS: Spawns input thread and allow GLFW to run on main thread On Linux/Windows: Simple blocking cin.get()

Usage (optional):

engine->start_graphics();
std::cout << "Press Enter to stop...\n";
MayaFlux::Await(); // Blocks here (optional)
engine->stop_graphics();
void Await()
Blocks launcher until user input (optional convenience function)
Definition Core.cpp:135

Definition at line 135 of file Core.cpp.

136{
137 if (internal::initialized) {
139 }
140}
void await_shutdown()
Blocks until shutdown is requested (main thread event loop)
Definition Engine.cpp:169
Core::Engine & get_context()
Gets the default engine instance.
Definition Core.cpp:58

References MayaFlux::Core::Engine::await_shutdown(), get_context(), and MayaFlux::internal::initialized.

Referenced by main().

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