When a process receives the ACQUIRED_FOREGROUND
message
through the system message queue, your application is already in the foreground and you own all foreground resources simultaneously. All drivers are
ready and the game threads on all three cores are being scheduled. For more information, see Multicore Processing
and the ProcUI Library.
Your application must do the following.
When not using ProcUI, a process has acquired the foreground when it
receives a message from the system message queue with
msg.data0 == OS_SYSTEM_MESSAGE_DATA0_ACQUIRED_FOREGROUND
set.
When using ProcUI, a process has acquired the foreground when
ProcUI receives PROCUI_MESSAGE_ACQUIRE
and
calls the appropriate callbacks.
After either of these events has happened, the process is in the foreground.
Upon reacquiring the foreground state, the application should make few assumptions about what GPU state remains from its previous foreground instance. MEM2 resources remained where they were. Any MEM1 resources will need to be reloaded. Display settings (see GX2DisplayPage) should not require resetting.
The application must start the rendering with a context state reset. This means it should begin the frame by calling either GX2ClearColor (or similar APIs, see GX2 Functions Which Disable State Shadowing) or GX2SetContextState. This is mandatory. It is not acceptable to attempt to reset every GX2 state manually, since this may not reset all of the GPU pipeline state.
ACQUIRED_FOREGROUND
message.GX2GetLastFrame
to get the previous frame and perform a crossfade.
Application Lifecycle
Foreground State
Background State
Request to Move to the Background
Transition Messages
Multicore Processing on the Wii U
Creating an Application
2013/08/08 Created
CONFIDENTIAL