Berserk
|
Game application main class. More...
#include <Application.hpp>
Public Member Functions | |
virtual BRK_API | ~Application ()=default |
BRK_API int | Run (int argc, const char *const *argv) |
Application entry point. More... | |
virtual BRK_API void | OnWindowCreate () |
On application primary window creation. More... | |
virtual BRK_API void | OnInitialize () |
On application initialize callback. More... | |
virtual void | OnPreUpdate () |
Called each frame before engine update. More... | |
virtual void | OnPostUpdate () |
Called each frame after engine update. More... | |
virtual BRK_API void | OnFinalize () |
On application finalize callback. More... | |
Game application main class.
Application class is an entry point and main loop manager for an end user application or a game. Controls overall application and engine setup. Allows to customise various stages of the application by overriding On*
callback functions.
Example of the usage in the game bellow:
|
virtualdefault |
|
inlinevirtual |
On application finalize callback.
Called once, before the engine systems are finalized. Override this method in our application game to add custom init finalize to the engine and application.
|
inlinevirtual |
On application initialize callback.
Called once, when the engine systems fully initialized. Override this method in our application game to add custom init logic to the engine and application.
|
inlinevirtual |
Called each frame after engine update.
Override this method to add custom pre update logic of the application inside main thread loop
|
inlinevirtual |
Called each frame before engine update.
Override this method to add custom pre update logic of the application inside main thread loop
|
inlinevirtual |
On application primary window creation.
Called once, when the engine is ready to create primary window, but not yet set up rendering and RHI device layer. Override this method to create your primary application window.
BRK_NS_BEGIN int Application::Run | ( | int | argc, |
const char *const * | argv | ||
) |
Application entry point.
This function initializes application and engine system, and enters main application loop of the game update. This function blocks execution flow and returns only when game is finished (or close of the application is requested).
argc | Input args count; must be passed from main |
argv | Input args list; must be passed from main |