Murl::IEngine Interface Referenceabstract

The main engine interface. More...

#include "murl_i_engine.h"

Inherited by Murl::Core::Engine.

Public Member Functions

virtual Bool Init (IApp *app, IEngineConfiguration *engineConfig, IDeviceHandler *deviceHandler)=0
 Initialize the engine. More...
 
virtual Bool DeInit ()=0
 De-initialize the engine. More...
 
virtual Bool Start ()=0
 Start the engine. More...
 
virtual Bool Stop ()=0
 Stop the started engine. More...
 
virtual Bool Pause ()=0
 Pause the engine. More...
 
virtual Bool Continue ()=0
 Continue the paused engine. More...
 
virtual Bool SaveData ()=0
 Save the engine data. More...
 
virtual Bool Suspend ()=0
 Suspend the engine. More...
 
virtual Bool Resume ()=0
 Resume the suspended engine. More...
 
virtual Bool BeginFrame ()=0
 Begin rendering a frame. More...
 
virtual Bool EndFrame ()=0
 End rendering a frame. More...
 
virtual Bool Invoke (const IMethodCall *call, Bool waitForMore)=0
 Invoke a method in the render thread context. More...
 
virtual Bool IsOnLogicThread () const =0
 Check if the caller is running on the logic thread. More...
 
virtual Bool IsOnLoaderThread () const =0
 Check if the caller is running on the loader thread. More...
 
virtual Bool IsOnRenderThread () const =0
 Check if the caller is running on the render thread. More...
 
virtual const Core::IClockGetClock () const =0
 Get the system clock. More...
 
virtual const Core::IStatisticsGetStatistics () const =0
 Get the system statistics. More...
 
virtual Core::IStatisticsGetStatistics ()=0
 Get the system statistics. More...
 

Detailed Description

The main engine interface.

The engine interface is created by the Murl::Factory.

Member Function Documentation

◆ Init()

virtual Bool Murl::IEngine::Init ( IApp app,
IEngineConfiguration engineConfig,
IDeviceHandler deviceHandler 
)
pure virtual

Initialize the engine.

Upon initialization, all sub-components of the engine are created and initialized.

Parameters
appThe app
engineConfigThe mutable engine configuration.
deviceHandlerA 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()

virtual Bool Murl::IEngine::Invoke ( const IMethodCall call,
Bool  waitForMore 
)
pure virtual

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
callThe method call object.
waitForMoreIf 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]

virtual const Core::IStatistics* Murl::IEngine::GetStatistics ( ) const
pure virtual

Get the system statistics.

Returns
The system statistics.

◆ GetStatistics() [2/2]

virtual Core::IStatistics* Murl::IEngine::GetStatistics ( )
pure virtual

Get the system statistics.

Returns
The system statistics.

The documentation for this interface was generated from the following file:
  • murl_i_engine.h


Copyright © 2011-2024 Spraylight GmbH.