Open 3D Engine LyShine Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
UiRenderer Class Reference

UI render interface. More...

#include <UiRenderer.h>

Inherits AZ::Render::Bootstrap::NotificationBus::Handler.

Classes

struct  BaseState
 
struct  UiShaderData
 

Public Member Functions

 UiRenderer (AZ::RPI::ViewportContextPtr viewportContext=nullptr)
 Constructor, constructed by the LyShine class.
 
bool IsReady ()
 Returns whether RPI has loaded all its assets and is ready to render.
 
void BeginUiFrameRender ()
 Start the rendering of the frame for LyShine.
 
void EndUiFrameRender ()
 End the rendering of the frame for LyShine.
 
void BeginCanvasRender ()
 Start the rendering of a UI canvas.
 
void EndCanvasRender ()
 End the rendering of a UI canvas.
 
AZ::RHI::Ptr< AZ::RPI::DynamicDrawContext > GetDynamicDrawContext ()
 Return the dynamic draw context associated with this UI renderer.
 
AZ::RHI::Ptr< AZ::RPI::DynamicDrawContext > CreateDynamicDrawContextForRTT (const AZStd::string &rttName)
 
const UiShaderDataGetUiShaderData ()
 Return the shader data for the ui shader.
 
AZ::Matrix4x4 GetModelViewProjectionMatrix ()
 Return the current orthographic view matrix.
 
AZ::Vector2 GetViewportSize ()
 Return the curent viewport size.
 
BaseState GetBaseState ()
 Get the current base state.
 
void SetBaseState (BaseState state)
 Set the base state.
 
AZ::RPI::ShaderVariantId GetCurrentShaderVariant ()
 Get the shader variant based on current render properties.
 
uint32_t GetStencilRef ()
 Get the current stencil test reference value.
 
void SetStencilRef (uint32_t)
 Set the stencil test reference value.
 
void IncrementStencilRef ()
 Increment the current stencil reference value.
 
void DecrementStencilRef ()
 Decrement the current stencil reference value.
 
AZStd::shared_ptr< AZ::RPI::ViewportContext > GetViewportContext ()
 Return the viewport context set by the user, or the default if not set.
 
void DebugSetRecordingOptionForTextureData (int recordingOption)
 Setup to record debug texture data before rendering.
 
void DebugDisplayTextureData (int recordingOption)
 Display debug texture data after rendering.
 
void DebugUseTexture (AZ::Data::Instance< AZ::RPI::Image > image)
 Track textures being used in the current frame.
 

Protected Attributes

BaseState m_baseState
 
uint32_t m_stencilRef = 0
 
UiShaderData m_uiShaderData
 
AZ::RHI::Ptr< AZ::RPI::DynamicDrawContext > m_dynamicDraw
 
bool m_isRPIReady = false
 
AZStd::shared_ptr< AZ::RPI::ViewportContext > m_viewportContext
 
AZ::RPI::ScenePtr m_ownedScene
 
AZ::RPI::Scene * m_scene = nullptr
 
int m_debugTextureDataRecordLevel = 0
 
AZStd::unordered_set< AZ::Data::Instance< AZ::RPI::Image > > m_texturesUsedInFrame
 

Static Protected Attributes

static constexpr char LogName [] = "UiRenderer"
 

Detailed Description

UI render interface.


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