| 36 | }; |
| 37 | |
| 38 | class Application |
| 39 | { |
| 40 | public: |
| 41 | Application(); |
| 42 | |
| 43 | virtual ~Application() = default; |
| 44 | |
| 45 | /** |
| 46 | * @brief Prepares the application for execution |
| 47 | */ |
| 48 | virtual bool prepare(const ApplicationOptions &options); |
| 49 | |
| 50 | /** |
| 51 | * @brief Updates the application |
| 52 | * @param delta_time The time since the last update |
| 53 | */ |
| 54 | virtual void update(float delta_time); |
| 55 | |
| 56 | /** |
| 57 | * @brief Main loop sample overlay events |
| 58 | * @param delta_time The time taken since the last frame |
| 59 | * @param additional_ui Function that implements an additional Gui |
| 60 | */ |
| 61 | virtual void update_overlay( |
| 62 | float delta_time, const std::function<void()> &additional_ui = []() {}); |
| 63 | |
| 64 | /** |
| 65 | * @brief Handles cleaning up the application |
| 66 | */ |
| 67 | virtual void finish(); |
| 68 | |
| 69 | /** |
| 70 | * @brief Handles resizing of the window |
| 71 | * @param width New width of the window |
| 72 | * @param height New height of the window |
| 73 | */ |
| 74 | virtual bool resize(const uint32_t width, const uint32_t height); |
| 75 | |
| 76 | /** |
| 77 | * @brief Handles input events of the window |
| 78 | * @param input_event The input event object |
| 79 | */ |
| 80 | virtual void input_event(const InputEvent &input_event); |
| 81 | |
| 82 | /** |
| 83 | * @brief Returns the drawer object for the sample |
| 84 | */ |
| 85 | virtual Drawer *get_drawer(); |
| 86 | |
| 87 | const std::string &get_name() const; |
| 88 | |
| 89 | void set_name(const std::string &name); |
| 90 | |
| 91 | DebugInfo &get_debug_info(); |
| 92 | |
| 93 | inline bool should_close() const |
| 94 | { |
| 95 | return requested_close; |
nothing calls this directly
no outgoing calls
no test coverage detected