IApplication
Description
Base interface for interactive real-time applications that are run by an ApplicationLoop.
The following methods will never be called from more than one thread at a time.
-
IApplicationRunnerConsumer.RunnerAttach: optionally once at application startup.
-
IProfilerConsumer.ProfilerAttach: optionally once at application startup.
-
WindowAttach: once at application startup
-
One or more iterations of the following loop:
-
One iteration of the main loop per frame:
-
IInputConsumer.ConsumeInput: once for each input event
-
WindowSize: once, if window size has changed since last frame.
-
IRenderable.Render: once
-
-
IProfilerConsumer.ProfilerDetach: optionally once at application shutdown.
-
IApplicationRunnerConsumer.RunnerDetach: optionally once at application shutdown.
-
IDisposable.Dispose: once at application shutdown
The main loop will be run only if there is a valid graphics context.
Public / Methods
GraphicsContextAttach
Attaches the application to its graphics context.
- RenderException
-
If a graphics subsystem error has occurred.
RunOperation
Runs the given operation within the lifecycle of this application.
The RunningOperation.Update method is called from within the applications IUpdateableFrameTime.UpdateFrameTime method.
The returned RunningOperation can be used to track progress resp. errors and to cancel the running operation.
When the application is disposed, all running operations are canceled (see RunningOperation.Cancel) and then disposed.