#include <WindowContext.h>
Inherits AzFramework::WindowNotificationBus::Handler, and AzFramework::ExclusiveFullScreenRequestBus::Handler.
Public Member Functions | |
| AZ_CLASS_ALLOCATOR (WindowContext, AZ::SystemAllocator) | |
| void | Initialize (RHI::Device &device, AzFramework::NativeWindowHandle windowHandle) |
| AZStd::vector< ViewportContextPtr > | GetAssociatedViewportContexts () |
| void | RegisterAssociatedViewportContext (ViewportContextPtr viewportContext) |
| Registers a ViewportContext as associated with this WindowContext. | |
| void | Shutdown () |
| Shuts down the WindowContext and destroys the underlying SwapChain. | |
| const RHI::AttachmentId & | GetSwapChainAttachmentId (ViewType viewType=ViewType::Default) const |
| Returns a unique attachment id associated with the swap chain. | |
| const RHI::Ptr< RHI::SwapChain > & | GetSwapChain (ViewType viewType=ViewType::Default) const |
| Retrieves the underlying SwapChain created by this WindowContext. | |
| const RHI::Viewport & | GetViewport (ViewType viewType=ViewType::Default) const |
| Retrieves the default ViewportState for the WindowContext. | |
| const RHI::Scissor & | GetScissor (ViewType viewType=ViewType::Default) const |
| Retrieves the default ScissorState for the WindowContext. | |
| AzFramework::NativeWindowHandle | GetWindowHandle () const |
| Get the window ID for the WindowContext. | |
| uint32_t | GetSwapChainsSize () const |
| Get the number of active swapchains. | |
| RHI::Scaling | GetSwapChainScalingMode () const |
| Get swapchain scaling mode. | |
An RPI-level understanding of a Window and its relevant SwapChain This is how the RPI creates a SwapChain from an AzFramework's Window and passes it down throughout the RPI. This is a convenient way to package the SwapChain, Window size, Attachment info and other window information needed to present to a surface.
| AZStd::vector< ViewportContextPtr > AZ::RPI::WindowContext::GetAssociatedViewportContexts | ( | ) |
Gets the ViewportContexts associated with this WindowContext, if any. Associated ViewportContexts can be enumerated to find the active rendered scene.
| void AZ::RPI::WindowContext::Initialize | ( | RHI::Device & | device, |
| AzFramework::NativeWindowHandle | windowHandle | ||
| ) |
Initializes the WindowContext from the given AzFramework's window param[in] windowHandle The native window handle of the Window we want to construct an RPI WindowContext for param[in] masterPassName The name of the pass that supplies input to the window's swapchain pass