#include <gameentrypoint.h>
Public Member Functions | |
| GameEntryPoint () | |
| virtual | ~GameEntryPoint () |
| The destructor of the GameEntryPoint. | |
| virtual void | Initialize (GameApplication &app, int argc, char **argv) |
| Called to initialize the game application. | |
| virtual void | OnStartup (GameApplication &app)=0 |
| Called after all startup related code is run. | |
| virtual void | OnShutdown (GameApplication &app) |
| This is the notice to the GameEntryPoint that the application is quitting. | |
Typically, a derivative of this class is compiled into a dynamic library, which gets loaded by a dtGame::GameApplication instance.
Note: If a dtGame::GameApplication is used to load this as a dynamic library, be sure to implement the two C functions as shown, typically in the .cpp file:
extern "C" API_EXPORT dtGame::GameEntryPoint* CreateGameEntryPoint() { return new MyGameEntryPoint(); } extern "C" API_EXPORT void DestroyGameEntryPoint(dtGame::GameEntryPoint *entryPoint) { delete entryPoint; }
| dtGame::GameEntryPoint::GameEntryPoint | ( | ) | [inline] |
| virtual dtGame::GameEntryPoint::~GameEntryPoint | ( | ) | [inline, virtual] |
The destructor of the GameEntryPoint.
| virtual void dtGame::GameEntryPoint::Initialize | ( | GameApplication & | app, | |
| int | argc, | |||
| char ** | argv | |||
| ) | [inline, virtual] |
Called to initialize the game application.
This gets called from the dtGame::GameApplication::Config() method, but before dtABC::Application::Config(). This allows some defining of the default Camera and Window, such as setting up stencil buffers. Note: If you want to replace the GameManager the GameApplication uses, this is a good place to hand it off.
| app | the current application | |
| argc | number of startup arguments. | |
| argv | array of string pointers to the arguments. |
| virtual void dtGame::GameEntryPoint::OnStartup | ( | GameApplication & | app | ) | [pure virtual] |
Called after all startup related code is run.
At this point, the dtGame::GameApplication has been configured and ready to be used. Override this method to perform any specific start up functionality that the GameEntryPoint needs to do.
| virtual void dtGame::GameEntryPoint::OnShutdown | ( | GameApplication & | app | ) | [inline, virtual] |
This is the notice to the GameEntryPoint that the application is quitting.
Perform any cleanup that needs to be done here.