MayaFlux 1.0.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. Calls window->poll() for each processing window
  2. Runs per-frame hooks
  3. Cleans up closed windows
Returns
True if processing should continue, false if all windows closed

Definition at line 208 of file WindowManager.cpp.

209{
210 for (auto& w : m_processing_windows)
211 w->poll();
212
213 {
214 std::lock_guard<std::mutex> lock(m_hooks_mutex);
215 for (const auto& [name, hook] : m_frame_hooks) {
216 hook();
217 }
218 }
219
221
222 return window_count() > 0;
223}
std::string name
Definition VKDevice.cpp:123
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.
std::vector< std::shared_ptr< Window > > m_processing_windows
size_t window_count() const
Gets number of active windows.

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

+ Here is the call graph for this function: