The main engine interface.
More...
#include "murl_i_engine.h"
Inherited by Murl::Core::Engine.
The main engine interface.
The engine interface is created by the Murl::Factory.
◆ Init()
Initialize the engine.
Upon initialization, all sub-components of the engine are created and initialized.
- Parameters
-
app | The app |
engineConfig | The mutable engine configuration. |
deviceHandler | A device handler instance that allows the engine to interact with various available input devices, such as keyboard, mouse, touch screen etc., as well as output devices such as rumble devices or e.g. system dialog. |
- Returns
- true if successful.
◆ DeInit()
virtual Bool Murl::IEngine::DeInit |
( |
| ) |
|
|
pure virtual |
De-initialize the engine.
Upon de-initialization, all sub-components of the engine are shut down and destroyed.
- Returns
- true if successful.
◆ Start()
virtual Bool Murl::IEngine::Start |
( |
| ) |
|
|
pure virtual |
Start the engine.
Start up all engine treads and start loading resources.
The engine can be started if Init() was successful.
- Returns
- true if successful.
◆ Stop()
virtual Bool Murl::IEngine::Stop |
( |
| ) |
|
|
pure virtual |
Stop the started engine.
Shut down all engine threads and destroy all resources.
The engine will stop if Start() was successful.
- Returns
- true if successful.
◆ Pause()
virtual Bool Murl::IEngine::Pause |
( |
| ) |
|
|
pure virtual |
Pause the engine.
The paused engine holds processing logic ticks until Continue() is called, but frame updates are processed further on.
The engine can be paused if Start() was successful.
- Returns
- true if successful.
◆ Continue()
virtual Bool Murl::IEngine::Continue |
( |
| ) |
|
|
pure virtual |
Continue the paused engine.
Continues logic ticks processing.
The engine will continue if Pause() was successful.
- Returns
- true if successful.
◆ SaveData()
virtual Bool Murl::IEngine::SaveData |
( |
| ) |
|
|
pure virtual |
Save the engine data.
The save engine data to disk.
- Returns
- true if successful.
◆ Suspend()
virtual Bool Murl::IEngine::Suspend |
( |
| ) |
|
|
pure virtual |
Suspend the engine.
The suspended engine holds processing logic ticks and frame updates and unloads suspendable resources until Resume() is called.
The engine can be suspended if Start() was successful.
- Returns
- true if successful.
◆ Resume()
virtual Bool Murl::IEngine::Resume |
( |
| ) |
|
|
pure virtual |
Resume the suspended engine.
Reloads suspendable resources and continues processing logic ticks and frame updates.
The engine will resume if Suspend() was successful.
- Returns
- true if successful.
◆ BeginFrame()
virtual Bool Murl::IEngine::BeginFrame |
( |
| ) |
|
|
pure virtual |
Begin rendering a frame.
This method must be called from a valid render thread context. This method returns when the rendering is done and the video double buffer can be swapped.
- Returns
- true if successful, if false is returned the platform code typically quits the application.
◆ EndFrame()
virtual Bool Murl::IEngine::EndFrame |
( |
| ) |
|
|
pure virtual |
End rendering a frame.
When swapping the video double buffer has been finished, this method must be called from a valid render thread context.
- Returns
- true if successful, if false is returned the platform code typically quits the application.
◆ Invoke()
Invoke a method in the render thread context.
The render thread context is the context of the EndFrame() caller. The invoke call is waiting until the method was processed. This method is intend for internal use only.
- Parameters
-
call | The method call object. |
waitForMore | If true, the engine continues processing the message loop for a given maximum amount of time, in order to e.g. speed up initialization of multiple render objects in a sequence. The maximum time can be set via IEngineConfiguration::SetSyncLoadingTimeout(). |
- Returns
- true if successful.
◆ IsOnLogicThread()
virtual Bool Murl::IEngine::IsOnLogicThread |
( |
| ) |
const |
|
pure virtual |
Check if the caller is running on the logic thread.
- Returns
- true if running on the logic thread.
◆ IsOnLoaderThread()
virtual Bool Murl::IEngine::IsOnLoaderThread |
( |
| ) |
const |
|
pure virtual |
Check if the caller is running on the loader thread.
- Returns
- true if running on the loader thread.
◆ IsOnRenderThread()
virtual Bool Murl::IEngine::IsOnRenderThread |
( |
| ) |
const |
|
pure virtual |
Check if the caller is running on the render thread.
- Returns
- true if running on the render thread.
◆ GetClock()
virtual const Core::IClock* Murl::IEngine::GetClock |
( |
| ) |
const |
|
pure virtual |
Get the system clock.
- Returns
- The system clock.
◆ GetStatistics() [1/2]
Get the system statistics.
- Returns
- The system statistics.
◆ GetStatistics() [2/2]
Get the system statistics.
- Returns
- The system statistics.
The documentation for this interface was generated from the following file: