Open 3D Engine AtomLyIntegration Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::AtomBridge::PerViewportDynamicDrawInterface Class Referenceabstract

#include <PerViewportDynamicDrawInterface.h>

Inherited by AZ::AtomBridge::PerViewportDynamicDrawManager.

Public Types

using DrawContextFactory = AZStd::function< void(RHI::Ptr< RPI::DynamicDrawContext >)>
 

Public Member Functions

 AZ_RTTI (PerViewportDynamicDrawInterface, "{1FF054F5-55FF-4ADB-A86D-640B15FA0395}")
 
virtual void RegisterDynamicDrawContext (AZ::Name name, DrawContextFactory contextInitializer)=0
 
virtual void UnregisterDynamicDrawContext (AZ::Name name)=0
 
virtual RHI::Ptr< RPI::DynamicDrawContext > GetDynamicDrawContextForViewport (AZ::Name name, AzFramework::ViewportId viewportId)=0
 

Detailed Description

A simple interface for allocating a DynamicDrawContext on-demand for every viewport, based on a registered initialization function.

Member Function Documentation

◆ GetDynamicDrawContextForViewport()

virtual RHI::Ptr< RPI::DynamicDrawContext > AZ::AtomBridge::PerViewportDynamicDrawInterface::GetDynamicDrawContextForViewport ( AZ::Name  name,
AzFramework::ViewportId  viewportId 
)
pure virtual

Get a dynamic draw context associated with the specified viewport based on a factory registered with RegisterNamedDynamicDrawContext. This dynamic draw context will be created if it does not already exist.

Implemented in AZ::AtomBridge::PerViewportDynamicDrawManager.

◆ RegisterDynamicDrawContext()

virtual void AZ::AtomBridge::PerViewportDynamicDrawInterface::RegisterDynamicDrawContext ( AZ::Name  name,
DrawContextFactory  contextInitializer 
)
pure virtual

Register a named dynamic draw context that can be retrieved on a per-viewport basis. GetNamedDynamicDraw context can be called on a registered context name to retrieve a valid DynamicDrawContext for a given viewport.

Implemented in AZ::AtomBridge::PerViewportDynamicDrawManager.

◆ UnregisterDynamicDrawContext()

virtual void AZ::AtomBridge::PerViewportDynamicDrawInterface::UnregisterDynamicDrawContext ( AZ::Name  name)
pure virtual

Unregister a previously registered named per-viewport dynamic draw context. This will dispose of all dynamic draw contexts currently associated with this name.

Implemented in AZ::AtomBridge::PerViewportDynamicDrawManager.


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