- DirectX Tutorial
- DirectX - Home
- 3D MATHS
- 3D Maths - Vector Algebra
- 3D Maths - Matrix Algebra
- 3D Maths - Transformations
- 3D Maths - DirectX Math
- DIRECTX
- DirectX - Overview
- DirectX - Installation
- DirectX - Components
- DirectX - Tools
- DirectX - Creating App
- DirectX - Window Events
- DirectX - App Lifecycle
- DirectX - Direct3D Initialization
- DirectX - First HLSL
- DirectX - Graphics Pipeline
- DirectX - Buffers
- DirectX - 3D Transformation
- DirectX - Drawing
- DirectX - Rendering
- DirectX - Modeling
- DirectX - Lighting
- DirectX - Texturing
- DirectX - Multi Texturing
- DirectX - Blending
- DirectX - Picking
- DirectX - Stenciling
- DirectX - First Shader
- DirectX - Pixel Shader
- DirectX - Geometry Shaders
- DirectX - Compute Shaders
- DirectX - Shader Effects
- DirectX - Quaternion
- DirectX Resources
- DirectX - Quick Guide
- DirectX - Useful Resources
- DirectX - Discussion
DirectX - App Lifecycle
In this chapter, we will focus on various states of execution which is important from application point of view. A basic application includes three states of execution as given below −
- Running
- Suspended
- NotRunning
NotRunning
The application always starts with NotRunning state. Whenever the user is ready to play the game, user will activate it.
Activated
Whenever the game is initialized, it moves to the activated state. After the game is activated, the game moves to running state.
Running
In this state, the game is considered to be in Running state where all the required events are running.
Suspended
Whenever user is running the game, it may happen that user will leave the game or switches into some other app. This state is defined as “Suspended” state and it consumes very little battery.
Terminate
Windows may at any time decide the game to be closed to make it available for other apps. The user may sometimes close the app permanently. At this point, the game is Terminated and is returned to NotRunning state.
There is no explicit functionality to save the game, all you need to know is understanding the process lifecycle. Windows gives you a feature of five seconds duration before suspension and after running state to save any information which user wants to store before the game is fully suspended.
To Continue Learning Please Login
Login with Google