Source/Gorgon/Main.h

branch
4.x-dev
changeset 1728
92bb193f0a6e
parent 1387
2e91fa117d0f
child 1729
06588a526327
equal deleted inserted replaced
1727:20deab12df40 1728:92bb193f0a6e
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 }

mercurial