58 /// application to update the display and perform OS tasks while still continuing operation. |
58 /// application to update the display and perform OS tasks while still continuing operation. |
59 inline void UpdateFrame(); |
59 inline void UpdateFrame(); |
60 |
60 |
61 /// Registers a function to be run at the start of the next frame. |
61 /// Registers a function to be run at the start of the next frame. |
62 void RegisterOnce(std::function<void()> fn); |
62 void RegisterOnce(std::function<void()> fn); |
|
63 |
|
64 /// Registers a function to be run at the start of the next frame. |
|
65 template<class F_, class ...A_> |
|
66 void RegisterOnce(F_ fn, A_ && ...args) { |
|
67 RegisterOnce(std::function<void()>(std::bind(fn, std::forward<A_>(args)...))); |
|
68 } |
|
69 |
63 |
70 |
64 extern Event<> BeforeFrameEvent; |
71 extern Event<> BeforeFrameEvent; |
65 } |
72 } |