|
Capycore Engine
0.1.0
A simple and lightweight game engine written in C++ based on the Unity API architecture.
|
Interface for backend system implementations handling low-level events. More...
#include <i_backend_system.h>
Public Member Functions | |
| virtual | ~IBackendSystem ()=default |
| virtual void | initialize_listeners (std::unordered_map< SystemEvent, std::vector< BackendCallback > > *listeners)=0 |
| virtual void | poll_events ()=0 |
| Polls for new events from the backend system. | |
| virtual void | init_frame_timer ()=0 |
| Initializes the internal timer for frame time calculation. | |
| virtual void | update_frame_time (float time_scale)=0 |
| Updates the frame time based on the elapsed time since the last frame. | |
| virtual float | delta_time () const =0 |
| Retrieves the time elapsed since the last frame. | |
| virtual float | frames_per_second () const =0 |
| Retrieves the frames per second (FPS) based on the updated frame time. | |
| virtual std::string | get_clipboard_text ()=0 |
| Sets the current text to the system clipboard. | |
| virtual void | set_cursor_to_arrow ()=0 |
| Sets the cursor to the standard arrow shape. | |
| virtual void | set_cursor_to_hand ()=0 |
| Sets the cursor to the hand shape. | |
| virtual void | set_cursor_to_ibeam ()=0 |
| Sets the cursor to the I-beam shape. | |
| virtual void | set_cursor_to_crosshair ()=0 |
| Sets the cursor to the crosshair shape. | |
| virtual void | set_cursor_to_wait ()=0 |
| Sets the cursor to the wait (hourglass) shape. | |
Protected Attributes | |
| uint64_t | last_ {0} |
| double | freq_ {0.0f} |
| float | delta_time_ {0.0f} |
| int | frame_count_ {0} |
| float | fps_ {0.0f} |
| float | accumulated_time_ {0.0f} |
Interface for backend system implementations handling low-level events.
Defines methods for initializing event listeners, polling events, and managing frame timing. Implementations should translate backend-specific events into engine-recognized events.
|
virtualdefault |
|
pure virtual |
Retrieves the time elapsed since the last frame.
Implemented in SDLBackendSystem.
|
pure virtual |
Retrieves the frames per second (FPS) based on the updated frame time.
Implemented in SDLBackendSystem.
|
pure virtual |
Sets the current text to the system clipboard.
| text | The text to set to the clipboard. |
Implemented in SDLBackendSystem.
|
pure virtual |
Initializes the internal timer for frame time calculation.
This method sets up the necessary variables to track frame time and should be called before starting the rendering loop.
Implemented in SDLBackendSystem.
|
pure virtual |
Implemented in SDLBackendSystem.
|
pure virtual |
Polls for new events from the backend system.
Should invoke registered callbacks for each event type as events are received.
Implemented in SDLBackendSystem.
|
pure virtual |
Sets the cursor to the standard arrow shape.
Implemented in SDLBackendSystem.
|
pure virtual |
Sets the cursor to the crosshair shape.
Implemented in SDLBackendSystem.
|
pure virtual |
Sets the cursor to the hand shape.
Implemented in SDLBackendSystem.
|
pure virtual |
Sets the cursor to the I-beam shape.
Implemented in SDLBackendSystem.
|
pure virtual |
Sets the cursor to the wait (hourglass) shape.
Implemented in SDLBackendSystem.
|
pure virtual |
Updates the frame time based on the elapsed time since the last frame.
| time_scale | A modifier to scale the delta time, useful for implementing slow-motion or speed-up effects. |
Implemented in SDLBackendSystem.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |