![]() |
XII Release 0.1.0
|
Public Types | |
| using | SUPER = xiiGameApplication |
| Public Types inherited from xiiGameApplication | |
| using | SUPER = xiiGameApplicationBase |
| Public Types inherited from xiiGameApplicationBase | |
| using | SUPER = xiiApplication |
| Public Types inherited from xiiApplication | |
| enum class | Execution : xiiUInt8 { Continue = 0U , Quit } |
| Defines the possible return values for the xiiApplication::Run() function. More... | |
Public Member Functions | |
| virtual xiiResult | BeforeCoreSystemsStartup () override |
| virtual void | AfterCoreSystemsStartup () override |
| virtual void | BeforeCoreSystemsShutdown () override |
| void | BeforeHighLevelSystemsShutdown () override |
| virtual xiiApplication::Execution | Run () override |
| void | LogWriter (const xiiLoggingEventData &e) |
| Public Member Functions inherited from xiiGameApplication | |
| xiiGameApplication (xiiStringView sAppName, xiiStringView sProjectPath={}) | |
| sProjectPath may be empty, if FindProjectDirectory() is overridden. | |
| void | ReinitializeInputConfig () |
| Used at runtime (by the editor) to reload input maps. Forwards to Init_ConfigureInput(). | |
| xiiStringView | GetAppProjectPath () const |
| Returns the project path that was given to the constructor (or modified by an overridden implementation). | |
| Public Member Functions inherited from xiiGameApplicationBase | |
| xiiGameApplicationBase (xiiStringView sAppName) | |
| void | TakeProfilingCapture () |
| Does a profiling capture and writes it to disk at ':appdata'. | |
| void | TakeScreenshot () |
| void | CaptureFrame () |
| void | SetContinuousFrameCapture (bool bEnable) |
| bool | GetContinousFrameCapture () const |
| virtual xiiResult | GetAbsFrameCaptureOutputPath (xiiStringBuilder &ref_sOutputPath) |
| Get the absolute base output path for frame captures. | |
| void | ActivateGameState (xiiWorld *pWorld, xiiStringView sStartPosition, const xiiTransform &startPositionOffset) |
| void | DeactivateGameState () |
| xiiGameStateBase * | GetActiveGameState () const |
| Returns the currently active game state. Could be nullptr. | |
| const xiiPlatformProfile & | GetPlatformProfile () const |
| Returns the xiiPlatformProfile that has been loaded for this application. | |
| void | RunOneFrame () |
| xiiTime | GetFrameTime () const |
| Public Member Functions inherited from xiiApplication | |
| xiiApplication (xiiStringView sAppName) | |
| Constructor. | |
| virtual | ~xiiApplication () |
| Virtual destructor. | |
| void | SetApplicationName (xiiStringView sAppName) |
| Changes the application name. | |
| const xiiString & | GetApplicationName () const |
| Returns the application name. | |
| virtual void | AfterHighLevelSystemsShutdown () |
| Called after xiiStartup::ShutdownHighLevelSystems() has been executed. | |
| virtual void | AfterCoreSystemsShutdown () |
| virtual void | BeforeEnterBackground () |
| virtual void | BeforeEnterForeground () |
| void | SetReturnCode (xiiInt32 iReturnCode) |
| xiiInt32 | GetReturnCode () const |
| Returns the currently set value that the application will return to the OS. | |
| virtual const char * | TranslateReturnCode () const |
| If the return code is not zero, this function might be called to get a string to print the error code in human readable form. | |
| void | SetCommandLineArguments (xiiUInt32 uiArgumentCount, const char **pArguments) |
| xiiUInt32 | GetArgumentCount () const |
| const char * | GetArgument (xiiUInt32 uiArgument) const |
| Returns one of the command line arguments that was passed to the application. | |
| const char ** | GetArgumentsArray () const |
| Returns the complete array of command line arguments that were passed to the application. | |
| void | EnableMemoryLeakReporting (bool bEnable) |
| bool | IsMemoryLeakReportingEnabled () const |
| virtual void | RequestQuit () |
| XII_ALWAYS_INLINE bool | WasQuitRequested () const |
| Returns whether RequestQuit() was called. | |
Protected Member Functions | |
| virtual void | BaseInit_ConfigureLogging () override |
| virtual void | Deinit_ShutdownLogging () override |
| virtual void | Init_FileSystem_ConfigureDataDirs () override |
| virtual bool | Run_ProcessApplicationInput () override |
| void | Run_WorldUpdateAndRender () override |
| void | Run_PresentImage () override |
| This function can be used to present the final image to a window. It is run at the end of the rendering phase. It can also be used to inspect the swap-chain e.g. for screenshot purposes before presenting. | |
| void | Run_FinishFrame () override |
| virtual xiiUniquePtr< xiiEditorEngineProcessApp > | CreateEngineProcessApp () |
| virtual void | ActivateGameStateAtStartup () override |
| Protected Member Functions inherited from xiiGameApplication | |
| virtual void | Init_ConfigureInput () override |
| virtual void | Init_ConfigureAssetManagement () override |
| virtual void | Init_LoadRequiredPlugins () override |
| virtual void | Init_SetupDefaultResources () override |
| virtual void | Init_SetupGraphicsDevice () override |
| virtual void | Deinit_ShutdownGraphicsDevice () override |
| void | RenderFps () |
| void | RenderConsole () |
| void | OnVSyncChanged (const xiiCVarEvent &e) |
| Protected Member Functions inherited from xiiGameApplicationBase | |
| virtual void | Deinit_UnloadPlugins () |
| virtual void | StoreScreenshot (xiiImage &&image, xiiStringView sContext={}) |
| Called with the result from taking a screenshot. The default implementation writes the image to disk at ':appdata/Screenshots'. | |
| void | ExecuteTakeScreenshot (xiiWindowOutputTargetBase *pOutputTarget, xiiStringView sContext={}) |
| void | ExecuteFrameCapture (xiiWindowHandle targetWindowHandle, xiiStringView sContext={}) |
| virtual xiiUniquePtr< xiiGameStateBase > | CreateGameState () |
| virtual xiiString | GetBaseDataDirectoryPath () const |
| virtual xiiString | GetProjectDataDirectoryPath () const |
| virtual void | ExecuteBaseInitFunctions () |
| Executes all 'BaseInit_' functions. Typically done very early, before core system startup. | |
| virtual void | ExecuteInitFunctions () |
| Executes all 'Init_' functions. Typically done after core system startup. | |
| virtual void | Init_PlatformProfile_SetPreferred () |
| virtual void | Init_ConfigureTelemetry () |
| virtual void | Init_FileSystem_SetSpecialDirs () |
| virtual void | Init_LoadWorldModuleConfig () |
| virtual void | Init_PlatformProfile_LoadForRuntime () |
| virtual void | Init_ConfigureTags () |
| virtual void | Init_ConfigureCVars () |
| virtual void | Run_InputUpdate () |
| virtual void | Run_BeforeWorldUpdate () |
| virtual void | Run_AfterWorldUpdate () |
| virtual void | Run_UpdatePlugins () |
| void | UpdateFrameTime () |
Private Member Functions | |
| virtual xiiString | FindProjectDirectory () const override |
Additional Inherited Members | |
| Static Public Member Functions inherited from xiiGameApplication | |
| static xiiGameApplication * | GetGameApplicationInstance () |
| Returns the xiiGameApplication singleton. | |
| static xiiStringView | GetActiveRenderer () |
| Returns the active renderer of the current app. Either the default or overridden via -render command line flag. | |
| static void | SetOverrideDefaultDeviceCreator (xiiDelegate< xiiSharedPtr< xiiGALDevice >(const xiiGALDeviceCreationDescription &)> creator) |
| static xiiGameApplicationBase * | GetGameApplicationBaseInstance () |
| Returns the xiiGameApplicationBase singleton. | |
| Static Public Member Functions inherited from xiiApplication | |
| static xiiApplication * | GetApplicationInstance () |
| Returns the one instance of xiiApplication that is available. | |
| xiiCopyOnBroadcastEvent< const xiiGameApplicationExecutionEvent & > | m_ExecutionEvents |
| Static Public Attributes inherited from xiiGameApplication | |
| static xiiCVarBool | cvar_AppVSync |
| static xiiCVarBool | cvar_AppShowFrameStats |
| Protected Attributes inherited from xiiGameApplication | |
| xiiString | m_sAppProjectPath |
| Stores what is given to the constructor. | |
| bool | m_bIgnoreErrors = false |
| bool | m_bShowConsole = false |
| xiiUniquePtr< xiiQuakeConsole > | m_pConsole |
| xiiEventSubscriptionID | m_CVarChangeSubscriptionID |
| bool | m_bTakeScreenshot = false |
| xiiConsoleFunction< void()> | m_ConFunc_TakeScreenshot |
| Expose TakeScreenshot() as a console function, so that it can be triggered by automated tests, e.g., when an image comparison fails, and game code. | |
| bool | m_bContinuousFrameCapture = false |
| bool | m_bCaptureFrame = false |
| xiiConsoleFunction< void()> | m_ConFunc_CaptureFrame |
| expose CaptureFrame() as a console function | |
| xiiUniquePtr< xiiGameStateBase > | m_pGameState |
| xiiPlatformProfile | m_PlatformProfile |
| xiiEventSubscriptionID | m_LogToConsoleID = 0 |
| xiiEventSubscriptionID | m_LogToVsID = 0 |
| xiiEvent< const xiiGameApplicationStaticEvent & > | m_StaticEvents |
| xiiTime | m_FrameTime |
| Protected Attributes inherited from xiiApplication | |
| bool | m_bWasQuitRequested = false |
| Static Protected Attributes inherited from xiiGameApplication | |
| static xiiGameApplication * | s_pGameApplicationInstance = nullptr |
| Copyright (c) Theophilus Eriata. All Rights Reserved. | |
| static xiiDelegate< xiiSharedPtr< xiiGALDevice >(const xiiGALDeviceCreationDescription &)> | s_DefaultDeviceCreator |
| static xiiGameApplicationBase * | s_pGameApplicationBaseInstance = nullptr |
| Copyright (c) Theophilus Eriata. All Rights Reserved. | |
|
inlineoverrideprotectedvirtual |
Allows to override whether a game state is created and activated at application startup.
The default implementation just calls ActivateGameState(), but applications that run inside the editor override this to do nothing, as they only want the game state to become active during simulation, not during editing.
Reimplemented from xiiGameApplicationBase.
|
overridevirtual |
This function is called after basic engine initialization has been done.
xiiApplication will automatically call xiiStartup::StartupCoreSystems() to initialize the application. This function can be overridden to do additional application specific initialization. To startup entire subsystems, you should however use the features provided by xiiStartup and xiiSubSystem.
Reimplemented from xiiGameApplicationBase.
|
overrideprotectedvirtual |
Reimplemented from xiiGameApplicationBase.
|
overridevirtual |
This function is called after the application main loop has run for the last time, before engine deinitialization.
Override this function to do application specific deinitialization that still requires a running engine. After this function returns xiiStartup::ShutdownCoreSystems() is called and thus everything, including allocators, is shut down. To shut down entire subsystems, you should, however, use the features provided by xiiStartup and xiiSubSystem.
Reimplemented from xiiGameApplicationBase.
|
overridevirtual |
This function is called before any kind of engine initialization is done.
Override this function to be able to configure subsystems, before they are initialized. After this function returns, xiiStartup::StartupCoreSystems() is automatically called. If you need to set up custom allocators, this is the place to do this.
Reimplemented from xiiGameApplicationBase.
|
overridevirtual |
This function is called after the application main loop has run for the last time, before engine deinitialization.
After this function call, xiiApplication executes xiiStartup::ShutdownHighLevelSystems().
Reimplemented from xiiGameApplicationBase.
|
overrideprotectedvirtual |
Reimplemented from xiiGameApplicationBase.
|
overrideprivatevirtual |
Implementation of xiiGameApplicationBase::FindProjectDirectory to define the 'project' special data directory.
The default implementation will try to resolve m_sAppProjectPath to an absolute path. m_sAppProjectPath can be absolute itself, relative to ">sdk/" or relative to xiiOSFile::GetApplicationDirectory(). m_sAppProjectPath must be set either via the xiiGameApplication constructor or manually set before project.
Alternatively, xiiGameApplication::FindProjectDirectory() must be overwritten.
Reimplemented from xiiGameApplication.
|
overrideprotectedvirtual |
Reimplemented from xiiGameApplicationBase.
|
overrideprivatevirtual |
Reimplemented from xiiGameApplicationBase.
|
overridevirtual |
Main run function which is called periodically. This function must be overridden.
Return Execution::Quit when the application should quit. You may set a return code via SetReturnCode() beforehand.
Reimplemented from xiiGameApplicationBase.
|
overrideprotectedvirtual |
Reimplemented from xiiGameApplication.
|
overrideprotectedvirtual |
This function can be used to present the final image to a window. It is run at the end of the rendering phase. It can also be used to inspect the swap-chain e.g. for screenshot purposes before presenting.
Reimplemented from xiiGameApplication.
|
overrideprotectedvirtual |
Reimplemented from xiiGameApplication.
|
overrideprotectedvirtual |
Reimplemented from xiiGameApplication.