Navigation
API > API/Runtime > API/Runtime/UMG
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.
| Name | SRetainerWidget |
| Type | class |
| Header File | /Engine/Source/Runtime/UMG/Public/Slate/SRetainerWidget.h |
| Include Path | #include "Slate/SRetainerWidget.h" |
Syntax
class SRetainerWidget :
public SCompoundWidget ,
public FSlateInvalidationRoot
Inheritance Hierarchy
- FGCObject → FSlateInvalidationRoot → SRetainerWidget
- FNoncopyable → FSlateInvalidationRoot → SRetainerWidget
- FSharedFromThisBase → TSharedFromThis → SWidget → SCompoundWidget → SRetainerWidget
- FSlateControlledConstruction → SWidget → SCompoundWidget → SRetainerWidget
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SRetainerWidget() |
Slate/SRetainerWidget.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~SRetainerWidget() |
Slate/SRetainerWidget.h |
Structs
| Name | Remarks |
|---|---|
| FArguments |
Enums
Protected
| Name | Remarks |
|---|---|
| EPaintRetainedContentResult |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| OnRetainerModeChangedDelegate | FOnRetainedModeChanged | Slate/SRetainerWidget.h | |
| Shared_MaxRetainerWorkPerFrame | int32 | Slate/SRetainerWidget.h | |
| Shared_RetainerWorkThisFrame | TFrameValue< int32 > | Slate/SRetainerWidget.h | |
| Shared_WaitingToRender | TArray< SRetainerWidget *, TInlineAllocator< 3 > > | Slate/SRetainerWidget.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bEnableRetainedRendering | bool | Slate/SRetainerWidget.h | ||
| bEnableRetainedRenderingDesire | bool | Slate/SRetainerWidget.h | ||
| bInvalidSizeLogged | bool | Slate/SRetainerWidget.h | ||
| bIsDesignTime | bool | True if widget is used in design time | Slate/SRetainerWidget.h | |
| bRenderRequested | bool | Slate/SRetainerWidget.h | ||
| bShowEffectsInDesigner | bool | True if we should retain rendering in designer | Slate/SRetainerWidget.h | |
| bWarnOnInvalidSize | bool | True if we should warn when the requested size for the retainer is 0 or too large | Slate/SRetainerWidget.h | |
| DynamicBrush | FSlateBrush | Slate/SRetainerWidget.h | ||
| DynamicEffectTextureParameter | FName | Slate/SRetainerWidget.h | ||
| HittestGrid | TSharedRef< FHittestGrid > | Slate/SRetainerWidget.h | ||
| LastDrawTime | double | Slate/SRetainerWidget.h | ||
| LastIncomingLayerId | int32 | Slate/SRetainerWidget.h | ||
| LastTickedFrame | int64 | Slate/SRetainerWidget.h | ||
| MyWidget | TSharedPtr< SWidget > | Slate/SRetainerWidget.h | ||
| OuterWorld | TWeakObjectPtr< UWorld > | Slate/SRetainerWidget.h | ||
| Phase | int32 | Slate/SRetainerWidget.h | ||
| PhaseCount | int32 | Slate/SRetainerWidget.h | ||
| PreviousAllottedGeometry | FGeometry | Slate/SRetainerWidget.h | ||
| PreviousClippingState | TOptional< FSlateClippingState > | Slate/SRetainerWidget.h | ||
| PreviousClipRectSize | FIntPoint | Slate/SRetainerWidget.h | ||
| PreviousColorAndOpacity | FColor | Slate/SRetainerWidget.h | ||
| PreviousRenderSize | FIntPoint | Slate/SRetainerWidget.h | ||
| RenderingResources | FRetainerWidgetRenderingResources * | Slate/SRetainerWidget.h | ||
| RenderOnInvalidation | bool | Slate/SRetainerWidget.h | ||
| RenderOnPhase | bool | Slate/SRetainerWidget.h | ||
| SurfaceBrush | FSlateBrush | Slate/SRetainerWidget.h | ||
| VirtualWindow | TSharedRef< SVirtualWindow > | Slate/SRetainerWidget.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Construct
(
const FArguments& Args |
Constructor | Slate/SRetainerWidget.h | |
UMaterialInstanceDynamic * GetEffectMaterial() |
Slate/SRetainerWidget.h | ||
void RequestRender() |
Requests that the retainer redraw the hosted content next time it's painted. | Slate/SRetainerWidget.h | |
void SetContent
(
const TSharedRef< SWidget >& InContent |
Slate/SRetainerWidget.h | ||
void SetEffectMaterial
(
UMaterialInterface* EffectMaterial |
Slate/SRetainerWidget.h | ||
void SetIsDesignTime
(
bool bInIsDesignTime |
Slate/SRetainerWidget.h | ||
void SetRenderingPhase
(
int32 Phase, |
Slate/SRetainerWidget.h | ||
void SetRetainedRendering
(
bool bRetainRendering |
Slate/SRetainerWidget.h | ||
void SetShowEffectsInDesigner
(
bool bInShowEffectsInDesigner |
Slate/SRetainerWidget.h | ||
void SetTextureParameter
(
FName TextureParameter |
Slate/SRetainerWidget.h | ||
void SetWorld
(
UWorld* World |
Slate/SRetainerWidget.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FChildren * Debug_GetChildrenForReflector() |
Slate/SRetainerWidget.h | ||
virtual FChildren * GetChildren() |
Slate/SRetainerWidget.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool IsAnythingVisibleToRender() |
Slate/SRetainerWidget.h | ||
void OnRetainerModeChanged() |
Slate/SRetainerWidget.h | ||
EPaintRetainedContentResult PaintRetainedContentImpl
(
const FSlateInvalidationContext& Context, |
Slate/SRetainerWidget.h | ||
void RefreshRenderingMode() |
Slate/SRetainerWidget.h | ||
bool ShouldBeRenderingOffscreen() |
Slate/SRetainerWidget.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const FSlateInvalidationRoot * Advanced_AsInvalidationRoot() |
Slate/SRetainerWidget.h | ||
virtual bool Advanced_IsInvalidationRoot() |
Slate/SRetainerWidget.h | ||
virtual FVector2D ComputeDesiredSize
(
float Scale |
Slate/SRetainerWidget.h | ||
virtual bool CustomPrepass
(
float LayoutScaleMultiplier |
Slate/SRetainerWidget.h | ||
virtual int32 OnPaint
(
const FPaintArgs& Args, |
SCompoundWidget interface | Slate/SRetainerWidget.h |
Overridden from FSlateInvalidationRoot
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedRef< SWidget > GetRootWidget() |
Slate/SRetainerWidget.h | ||
virtual void OnRootInvalidated() |
Slate/SRetainerWidget.h | ||
virtual int32 PaintSlowPath
(
const FSlateInvalidationContext& Context |
Slate/SRetainerWidget.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void OnRetainerModeCVarChanged
(
IConsoleVariable* CVar |
Slate/SRetainerWidget.h |