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

◆ register_frame_hook()

void MayaFlux::Core::WindowManager::register_frame_hook ( const std::string &  name,
std::function< void()>  hook 
)

Register a hook that runs every frame.

Parameters
nameHook identifier
hookFunction to call each frame

Definition at line 189 of file WindowManager.cpp.

191{
192 std::lock_guard<std::mutex> lock(m_hooks_mutex);
193 m_frame_hooks[name] = std::move(hook);
194}
std::mutex m_hooks_mutex
Mutex for protecting m_windows and m_window_lookup.
std::unordered_map< std::string, std::function< void()> > m_frame_hooks
Calls all registered frame hooks.

References m_frame_hooks, and m_hooks_mutex.