Core application manager handling initialization, update loop, rendering, and shutdown. More...
#include <Framework.h>
Public Types | |
| enum class | ExecutionPolicy : u8 { FrameBoundary } |
Public Member Functions | |
| FRAMEWORK_API void | Initialize () |
| Initializes all core subsystems and configures the application. | |
| FRAMEWORK_API void | Update () |
| Performs a single update tick for the framework. | |
| FRAMEWORK_API void | Shutdown () |
| Cleans up and shuts down all subsystems and renderer. | |
| FRAMEWORK_API void | BeginRender () const |
| Begins the rendering process for the current frame. | |
| FRAMEWORK_API void | EndRender () const |
| Ends the rendering process and presents the frame. | |
| FRAMEWORK_API void | UpdateWindow () noexcept |
| Updates the window state, polling events and platform messages. | |
| FRAMEWORK_API bool | OnWindowResize (WindowResizeEvent &event) |
| Handles window resize events. | |
| FRAMEWORK_API bool | OnWindowClose (WindowCloseEvent &event) |
| Handles window close events. | |
| FRAMEWORK_API void | SendWindowCloseEvent () |
| Sends a window close event. | |
| FRAMEWORK_API void | ProcessEvents () |
| Dispatches an event to internal handlers and systems. | |
| bool | IsRunning () const |
| Checks if the framework is currently running. | |
| bool | IsMinimized () const |
| Checks if the window is minimized. | |
Static Public Member Functions | |
| template<typename Fn> | |
| static void | SyncPoint (ExecutionPolicy policy, Fn &&fn) |
| static Window & | GetWindow () |
| Access the singleton Window instance. | |
| static ConfigurationManager & | GetConfigManager () |
| Access the singleton ConfigurationManager instance. | |
| static SystemManager & | GetSystemManager () |
| Access the singleton SystemManager instance. | |
| static UIManager & | GetUIManager () |
| Access the singleton UIManager instance. | |
| static DeferredExecutionQueue & | GetExecutionQueue () |
| static Timestep | GetTimestep () |
| Gets the time elapsed since last frame. | |
| static Crux::vec2 | GetWindowDimensions () |
| static ApplicationSpecification & | GetAppSettings () |
| static std::string | GetConfiguration () |
| Returns the current build configuration as a string. | |
| static std::string | GetPlatform () |
| Returns the platform the application is running on as a string. | |
Core application manager handling initialization, update loop, rendering, and shutdown.
The Framework class manages the application's lifecycle including window creation, event processing, system updates, renderer coordination, and UI management. It provides static access to core singletons like Window, ConfigurationManager, SystemManager, and UIManager, and manages timing and running state.
|
strong |
| void Raven::Framework::BeginRender | ( | ) | const |
Begins the rendering process for the current frame.
Handles swapchain recreation and prepares renderer and UI for drawing.
| void Raven::Framework::EndRender | ( | ) | const |
Ends the rendering process and presents the frame.
Completes rendering, presents the swapchain, and cleans up UI renderer resources.
|
inlinestatic |
|
inlinestatic |
Access the singleton ConfigurationManager instance.
|
inlinestatic |
Returns the current build configuration as a string.
|
inlinestatic |
|
inlinestatic |
Returns the platform the application is running on as a string.
|
inlinestatic |
Access the singleton SystemManager instance.
|
inlinestatic |
Gets the time elapsed since last frame.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| void Raven::Framework::Initialize | ( | ) |
Initializes all core subsystems and configures the application.
Loads configuration, initializes logger, hardware checks, window, renderer, system manager, and UI manager.
|
inline |
Checks if the window is minimized.
|
inline |
Checks if the framework is currently running.
| bool Raven::Framework::OnWindowClose | ( | WindowCloseEvent & | event | ) |
Handles window close events.
| event | The window close event. |
| bool Raven::Framework::OnWindowResize | ( | WindowResizeEvent & | event | ) |
Handles window resize events.
| event | The resize event data. |
| void Raven::Framework::ProcessEvents | ( | ) |
Dispatches an event to internal handlers and systems.
| void Raven::Framework::SendWindowCloseEvent | ( | ) |
Sends a window close event.
| void Raven::Framework::Shutdown | ( | ) |
Cleans up and shuts down all subsystems and renderer.
|
inlinestatic |
| void Raven::Framework::Update | ( | ) |
Performs a single update tick for the framework.
Calculates delta time, updates all registered systems, and handles minimized state.
|
noexcept |
Updates the window state, polling events and platform messages.