Open 3D Engine Atom Gem API Reference  2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Public Member Functions | List of all members
AZ::RPI::WindowContext Class Referencefinal

#include <WindowContext.h>

Inherits Handler, and Handler.

Public Member Functions

 AZ_CLASS_ALLOCATOR (WindowContext, AZ::SystemAllocator, 0)
 
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 () const
 Returns a unique attachment id associated with the swap chain.
 
const RHI::Ptr< RHI::SwapChain > & GetSwapChain () const
 Retrieves the underlying SwapChain created by this WindowContext.
 
const RHI::ViewportGetViewport () const
 Retrieves the default ViewportState for the WindowContext.
 
const RHI::ScissorGetScissor () const
 Retrieves the default ScissorState for the WindowContext.
 
AzFramework::NativeWindowHandle GetWindowHandle () const
 Get the window ID for the WindowContext.
 

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

◆ GetAssociatedViewportContexts()

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.

◆ Initialize()

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: