MayaFlux 0.1.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 173 of file WindowManager.cpp.

174{
175 glfwPollEvents();
176
177 {
178 std::lock_guard<std::mutex> lock(m_hooks_mutex);
179 for (const auto& [name, hook] : m_frame_hooks) {
180 hook();
181 }
182 }
183
185
186 return window_count() > 0;
187}
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.

References destroy_closed_windows(), m_frame_hooks, m_hooks_mutex, and window_count().

+ Here is the call graph for this function: