Runs the window's event loop. This is a blocking call that won't exit until the window is closed. Args: tick_func: A callable, function to call every frame.
(self, tick_func)
| 275 | self.close() |
| 276 | |
| 277 | def event_loop(self, tick_func): |
| 278 | """Runs the window's event loop. |
| 279 | |
| 280 | This is a blocking call that won't exit until the window is closed. |
| 281 | |
| 282 | Args: |
| 283 | tick_func: A callable, function to call every frame. |
| 284 | """ |
| 285 | while not glfw.window_should_close(self._context.window): |
| 286 | self.update(tick_func) |
| 287 | |
| 288 | def update(self, render_func): |
| 289 | """Updates the window and renders a new image. |