Class SceneHostApplication
Hosts a single active engine scene and supports explicit scene switching.
public class SceneHostApplication : IEngineApplication, IHostedEngineApplication
- Inheritance
-
SceneHostApplication
- Implements
- Inherited Members
Constructors
SceneHostApplication(IEngineScene)
Creates a scene-hosted application with an initial active scene.
public SceneHostApplication(IEngineScene initialScene)
Parameters
initialSceneIEngineSceneThe initial scene to activate during initialization.
Properties
ActiveScene
Gets the currently active scene.
public IEngineScene ActiveScene { get; }
Property Value
HostServices
Gets the host services injected by the active runtime backend.
public IEngineHostServices HostServices { get; }
Property Value
Methods
Initialize()
Initializes the application and any owned engine systems.
public virtual void Initialize()
Render(IRenderContext)
Draws the current frame into the supplied render context.
public virtual void Render(IRenderContext renderContext)
Parameters
renderContextIRenderContextThe render context exposed by the active host backend.
SetHostServices(IEngineHostServices)
Supplies host services that remain valid for the lifetime of the application instance.
public void SetHostServices(IEngineHostServices hostServices)
Parameters
hostServicesIEngineHostServicesThe host services exposed by the active runtime backend.
Shutdown()
Shuts the application down and releases owned resources.
public virtual void Shutdown()
SwitchScene(IEngineScene)
Replaces the current active scene with a new scene.
public void SwitchScene(IEngineScene nextScene)
Parameters
nextSceneIEngineSceneThe scene that should become active.
Update(FrameTime, FrameInput)
Advances application state for one frame.
public virtual void Update(FrameTime frameTime, FrameInput input)
Parameters
frameTimeFrameTimeThe frame timing snapshot supplied by the active host.
inputFrameInputThe input snapshot for the current frame.