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

◆ process()

bool MayaFlux::Core::WindowManager::process ( )

Process windows for one frame.

This is the main per-frame operation that should be called from the application's main loop. It:

  1. Polls GLFW events (triggers EventSource)
  2. Cleans up closed windows
  3. Optionally runs per-frame hooks
Returns
True if processing should continue, false if all windows closed

Definition at line 189 of file WindowManager.cpp.

190{
192 glfwPollEvents();
193 });
194
195 {
196 std::lock_guard<std::mutex> lock(m_hooks_mutex);
197 for (const auto& [name, hook] : m_frame_hooks) {
198 hook();
199 }
200 }
201
203
204 return window_count() > 0;
205}
std::mutex m_hooks_mutex
Mutex for protecting m_windows and m_window_lookup.
size_t destroy_closed_windows()
Destroys all windows that should close.
std::unordered_map< std::string, std::function< void()> > m_frame_hooks
Calls all registered frame hooks.
size_t window_count() const
Gets number of active windows.
auto dispatch_main_sync(Func &&func, Args &&... args) -> decltype(auto)
Definition Parallel.hpp:110

References destroy_closed_windows(), MayaFlux::Parallel::dispatch_main_sync(), m_frame_hooks, m_hooks_mutex, and window_count().

+ Here is the call graph for this function: