#include <blowbox_core.h>
|
static bool | alive = false |
|
The core of Blowbox.
This is the main class that the user has to create upon startup. It sets up everything for you. All necessary subsystems are initialized and setup. You can start executing Blowbox by calling BlowboxCore::Run(). Before doing so, you have the option to set a few user procedures that happen at different times during the execution of the application. These are provided via functions such as BlowboxCore::SetUpdateProcedure(). BlowboxCore can only be created through the BlowboxCore::BlowboxCore(BlowboxConfig* config) constructor, because a config is mandatory.
blowbox::BlowboxCore::BlowboxCore |
( |
| ) |
|
This is a dummy constructor and doesn't do anything except that it enables this class to have a default constructor.
Constructs the actual BlowboxCore.
- Parameters
-
[in] | config | The configuration you wish to use for the BlowboxCore instance |
blowbox::BlowboxCore::BlowboxCore |
( |
const BlowboxCore & |
that | ) |
|
|
delete |
The copy destructor is unavailable. A BlowboxCore isn't copyable.
blowbox::BlowboxCore::~BlowboxCore |
( |
| ) |
|
bool blowbox::BlowboxCore::IsBlowboxAlive |
( |
| ) |
|
Figures out whether the BlowboxCore should shutdown based on the state of the engine (window, input, etc)
void blowbox::BlowboxCore::Render |
( |
| ) |
|
|
protected |
Performs the render step in the game loop.
This function triggers the rendering of the game to the main Window instance. User procedures are also called by this function.
void blowbox::BlowboxCore::Run |
( |
| ) |
|
Kicks off the gameloop.
This starts the actual gameloop. All subsystems will be properly initialized and retrievable through the Get class from this point on. This function is blocking until the game is exited. You can manually trigger an exit by calling BlowboxCore::Shutdown() from one of the user procedures. First, all subsystems are initialized. Second, the game loop is entered. Each frame the game gets updated and rendered. After the game loop is done, subsystems automatically get shutdown. Once BlowboxCore::Run() returns, you are free to delete the BlowboxCore instance from the heap.
void blowbox::BlowboxCore::SetPostRenderProcedure |
( |
const Function< void > & |
post_render_procedure | ) |
|
Sets the PostRender user procedure.
The PostRender procedure is invoked every frame after the entire scene is rendered. It allows you to enter some miscellaneous code after the game gets rendered, essentially.
- Parameters
-
[in] | post_render_procedure | The function that should be called each frame when the PostRender step happens in the game loop |
void blowbox::BlowboxCore::SetPostUpdateProcedure |
( |
const Function< void > & |
post_update_procedure | ) |
|
Set the PostUpdate user procedure.
The PostUpdate procedure is invoked every frame after the entire scene is updated. It allows you to enter some miscellaneous code after the game gets updated, essentially.
- Parameters
-
[in] | post_update_procedure | The function that should be called each frame when the PostUpdate step happens in the game loop |
void blowbox::BlowboxCore::SetRenderProcedure |
( |
const Function< void > & |
render_procedure | ) |
|
Sets the Render user procedure.
The Render procedure is invoked every frame before the entire scene is rendered. It allows you to enter some miscellaneous code before the game gets rendered, essentially.
- Parameters
-
[in] | render_procedure | The function that should be called each frame when the Render step happens in the game loop |
void blowbox::BlowboxCore::SetRunProcedure |
( |
const Function< void > & |
run_procedure | ) |
|
Sets the Run user procedure.
The Run procedure is invoked immediately after all subsystems have been initialized (after calling BlowboxCore::Run()). It allows you to enter some miscellaneous code before the actual game loop starts.
- Parameters
-
[in] | run_procedure | The function that should be called when the Run step happens in the game loop |
void blowbox::BlowboxCore::SetShutdownProcedure |
( |
const Function< void > & |
shutdown_procedure | ) |
|
Sets the Shutdown user procedure.
The Shutdown procedure is invoked right after the final frame has been executed by the game loop, but before all subsystems get shutdown. It allows you to enter some miscellaneous code after the game gets shutdown.
- Parameters
-
[in] | shutdown_procedure | The function that should be called when the Shutdown step happens in the game loop |
void blowbox::BlowboxCore::SetUpdateProcedure |
( |
const Function< void > & |
update_procedure | ) |
|
Sets the Update user procedure.
The Update procedure is invoked every frame before the entire scene is updated. It allows you to enter some miscellaneous code before the game gets updated, essentially.
- Parameters
-
[in] | update_procedure | The function that should be called each frame when the Update step happens in the game loop |
void blowbox::BlowboxCore::Shutdown |
( |
| ) |
|
Request BlowboxCore to shutdown.
This function requests BlowboxCore to shutdown. BlowboxCore will finish the current frame and then continue to shutdown all the different subsystems.
void blowbox::BlowboxCore::ShutdownDebug |
( |
| ) |
|
|
protected |
Shuts down the debug subsystems.
void blowbox::BlowboxCore::ShutdownGetter |
( |
| ) |
|
|
protected |
Shuts down the Getter system.
void blowbox::BlowboxCore::ShutdownRenderer |
( |
| ) |
|
|
protected |
Shuts down the Renderer subsystems.
void blowbox::BlowboxCore::ShutdownScene |
( |
| ) |
|
|
protected |
Shuts down the Scene subsystems.
void blowbox::BlowboxCore::ShutdownWin32 |
( |
| ) |
|
|
protected |
Shuts down the Win32 subsystems.
void blowbox::BlowboxCore::StartupDebug |
( |
| ) |
|
|
protected |
Starts up the debug subsystems.
void blowbox::BlowboxCore::StartupGetter |
( |
| ) |
|
|
protected |
Starts up the Getter system.
void blowbox::BlowboxCore::StartupRenderer |
( |
| ) |
|
|
protected |
Starts up the Renderer subsystems.
void blowbox::BlowboxCore::StartupScene |
( |
| ) |
|
|
protected |
Starts up the Scene subsystems.
void blowbox::BlowboxCore::StartupWin32 |
( |
| ) |
|
|
protected |
Starts up the Win32 subsystems.
void blowbox::BlowboxCore::Update |
( |
| ) |
|
|
protected |
Performs the update step in the game loop.
This function updates all subsystems in the engine in the correct order. User procedures are also called by this function.
bool blowbox::BlowboxCore::alive = false |
|
static |
Static variable to determine whether the BlowboxCore is alive.
The configuration of blowbox.
Get* blowbox::BlowboxCore::getter_ |
|
private |
The Get instance that is used in the entire engine.
The Device used by the renderers.
bool blowbox::BlowboxCore::shutdown_requested_ |
|
private |
Tracks whether the engine should still be alive.
Function<void> blowbox::BlowboxCore::user_procedure_post_render_ |
|
private |
The procedure that is defined by the user for the PostRender step.
Function<void> blowbox::BlowboxCore::user_procedure_post_update_ |
|
private |
The procedure that is defined by the user for the PostUpdate step.
Function<void> blowbox::BlowboxCore::user_procedure_render_ |
|
private |
The procedure that is defined by the user for the Render step.
Function<void> blowbox::BlowboxCore::user_procedure_run_ |
|
private |
The procedure that is defined by the user for the Run step.
Function<void> blowbox::BlowboxCore::user_procedure_shutdown_ |
|
private |
The procedure that is defined by the user for the Shutdown step.
Function<void> blowbox::BlowboxCore::user_procedure_update_ |
|
private |
The procedure that is defined by the user for the Update step.
The documentation for this class was generated from the following files:
- C:/Projects/blowbox-2017/src/core/core/blowbox_core.h
- C:/Projects/blowbox-2017/src/core/core/blowbox_core.cc