Raven Engine v0.1
A modern 3D Game Engine
Loading...
Searching...
No Matches
Raven::Framework Class Reference

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 WindowGetWindow ()
 Access the singleton Window instance.
static ConfigurationManagerGetConfigManager ()
 Access the singleton ConfigurationManager instance.
static SystemManagerGetSystemManager ()
 Access the singleton SystemManager instance.
static UIManagerGetUIManager ()
 Access the singleton UIManager instance.
static DeferredExecutionQueueGetExecutionQueue ()
static Timestep GetTimestep ()
 Gets the time elapsed since last frame.
static Crux::vec2 GetWindowDimensions ()
static ApplicationSpecificationGetAppSettings ()
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.

Detailed Description

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.

Member Enumeration Documentation

◆ ExecutionPolicy

enum class Raven::Framework::ExecutionPolicy : u8
strong
Enumerator
FrameBoundary 

Member Function Documentation

◆ BeginRender()

void Raven::Framework::BeginRender ( ) const

Begins the rendering process for the current frame.

Handles swapchain recreation and prepares renderer and UI for drawing.

◆ EndRender()

void Raven::Framework::EndRender ( ) const

Ends the rendering process and presents the frame.

Completes rendering, presents the swapchain, and cleans up UI renderer resources.

◆ GetAppSettings()

ApplicationSpecification & Raven::Framework::GetAppSettings ( )
inlinestatic
Returns
Reference to the ApplicationSpecification structure.

◆ GetConfigManager()

ConfigurationManager & Raven::Framework::GetConfigManager ( )
inlinestatic

Access the singleton ConfigurationManager instance.

Returns
Reference to the ConfigurationManager object.

◆ GetConfiguration()

std::string Raven::Framework::GetConfiguration ( )
inlinestatic

Returns the current build configuration as a string.

Returns
Build configuration ("Debug", "Release", "Distribution", or "Unknown").

◆ GetExecutionQueue()

DeferredExecutionQueue & Raven::Framework::GetExecutionQueue ( )
inlinestatic

◆ GetPlatform()

std::string Raven::Framework::GetPlatform ( )
inlinestatic

Returns the platform the application is running on as a string.

Returns
Platform name ("Windows", "Linux", "OSX", or "Unknown").

◆ GetSystemManager()

SystemManager & Raven::Framework::GetSystemManager ( )
inlinestatic

Access the singleton SystemManager instance.

Returns
Reference to the SystemManager object.

◆ GetTimestep()

Timestep Raven::Framework::GetTimestep ( )
inlinestatic

Gets the time elapsed since last frame.

Returns
Timestep representing delta time.

◆ GetUIManager()

UIManager & Raven::Framework::GetUIManager ( )
inlinestatic

Access the singleton UIManager instance.

Returns
Reference to the UIManager object.

◆ GetWindow()

Window & Raven::Framework::GetWindow ( )
inlinestatic

Access the singleton Window instance.

Returns
Reference to the Window object.

◆ GetWindowDimensions()

Crux::vec2 Raven::Framework::GetWindowDimensions ( )
inlinestatic

◆ Initialize()

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.

◆ IsMinimized()

bool Raven::Framework::IsMinimized ( ) const
inline

Checks if the window is minimized.

Returns
true if minimized, false otherwise.

◆ IsRunning()

bool Raven::Framework::IsRunning ( ) const
inline

Checks if the framework is currently running.

Returns
true if running, false otherwise.

◆ OnWindowClose()

bool Raven::Framework::OnWindowClose ( WindowCloseEvent & event)

Handles window close events.

Parameters
eventThe window close event.
Returns
false to continue event propagation.

◆ OnWindowResize()

bool Raven::Framework::OnWindowResize ( WindowResizeEvent & event)

Handles window resize events.

Parameters
eventThe resize event data.
Returns
false to continue event propagation.

◆ ProcessEvents()

void Raven::Framework::ProcessEvents ( )

Dispatches an event to internal handlers and systems.

◆ SendWindowCloseEvent()

void Raven::Framework::SendWindowCloseEvent ( )

Sends a window close event.

◆ Shutdown()

void Raven::Framework::Shutdown ( )

Cleans up and shuts down all subsystems and renderer.

◆ SyncPoint()

template<typename Fn>
void Raven::Framework::SyncPoint ( ExecutionPolicy policy,
Fn && fn )
inlinestatic

◆ Update()

void Raven::Framework::Update ( )

Performs a single update tick for the framework.

Calculates delta time, updates all registered systems, and handles minimized state.

◆ UpdateWindow()

void Raven::Framework::UpdateWindow ( )
noexcept

Updates the window state, polling events and platform messages.


The documentation for this class was generated from the following files: