Open 3D Engine Atom Gem API Reference  23.05.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::RPI::WindowContext Class Referencefinal

#include <WindowContext.h>

Inherits Handler, and Handler.

Public Member Functions

 AZ_CLASS_ALLOCATOR (WindowContext, AZ::SystemAllocator)
void Initialize (RHI::Device &device, AzFramework::NativeWindowHandle windowHandle)
AZStd::vector< ViewportContextPtrGetAssociatedViewportContexts ()
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::ViewportGetViewport (ViewType viewType=ViewType::Default) const
 Retrieves the default ViewportState for the WindowContext.
const RHI::ScissorGetScissor (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.

Detailed Description

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.

Member Function Documentation

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

The documentation for this class was generated from the following file: