SRetainerWidget

The [SRetainerWidget](API\Runtime\UMG\Slate\SRetainerWidget) renders children widgets to a render target first before later rendering that render target to the screen.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

UMG

Header

/Engine/Source/Runtime/UMG/Public/Slate/SRetainerWidget.h

Include

#include "Slate/SRetainerWidget.h"

Syntax

class SRetainerWidget :
    public SCompoundWidget,
    public FSlateInvalidationRoot

Remarks

The SRetainerWidget renders children widgets to a render target first before later rendering that render target to the screen. This allows both frequency and phase to be controlled so that the UI can actually render less often than the frequency of the main game render. It also has the side benefit of allow materials to be applied to the render target after drawing the widgets to apply a simple post process.

Constructors

Name Description

Public function

SRetainerWidget()

Destructors

Name Description

Public function

~SRetainerWidget()

Functions

Name Description

Public function

void

 

Construct

(
    const FArguments& Args
)

Constructor

Public function Const

UMaterialIns...

 

GetEffectMaterial()

Protected function Const

bool

 

IsAnythingVisibleToRender()

Protected function

void

 

OnGlobalInvalidate

(
    bool bClearResourcesImmediately
)

Protected function

void

 

OnRetainerModeChanged()

Public function Virtual

bool

 

PaintRetainedContent

(
    const FSlateInvalidationContext& C...,
    const FGeometry& AllottedGeometry
)

FInvalidationRoot interface

Protected function

void

 

RefreshRenderingMode()

Public function

void

 

RequestRender()

Requests that the retainer redraw the hosted content next time it's painted.

Public function

void

 

SetContent

(
    const TSharedRef< SWidget >& InCon...
)

Public function

void

 

SetEffectMaterial

(
    UMaterialInterface* EffectMate...
)

Public function

void

 

SetRenderingPhase

(
    int32 Phase,
    int32 PhaseCount
)

Public function

void

 

SetRetainedRendering

(
    bool bRetainRendering
)

Public function

void

 

SetTextureParameter

(
    FName TextureParameter
)

Public function

void

 

SetWorld

(
    UWorld* World
)

Protected function Const

bool

 

ShouldBeRenderingOffscreen()

Overridden from SWidget

Name Description

Protected function Virtual Const

bool

 

Advanced_IsInvalidationRoot()

Protected function Virtual Const

FVector2D

 

ComputeDesiredSize

(
    float LayoutScaleMultiplier
)

Compute the ideal size necessary to display this widget.

Protected function Virtual

bool

 

CustomPrepass

(
    float LayoutScaleMultiplier
)

Public function Virtual

FChildren &#...

 

GetAllChildren()

Public function Virtual

FChildren &#...

 

GetChildren()

SWidget interface

Protected function Virtual Const

int32

 

OnPaint

(
    const FPaintArgs& Args,
    const FGeometry& AllottedGeometry,
    const FSlateRect& MyCullingRect,
    FSlateWindowElementList& OutDrawEl...,
    int32 LayerId,
    const FWidgetStyle& InWidgetStyle,
    bool bParentEnabled
)

SCompoundWidget interface

Overridden from FSlateInvalidationRoot

Name Description

Protected function Virtual

int32

 

PaintSlowPath

(
    const FSlateInvalidationContext& C...
)

FSlateInvalidationRoot interface

Classes

Name

Description

Public struct

FArguments

Constants

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss