UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FSlateNullRenderer Class Reference

#include <SlateNullRenderer.h>

+ Inheritance diagram for FSlateNullRenderer:

Public Member Functions

 FSlateNullRenderer (const TSharedRef< FSlateFontServices > &InSlateFontServices, const TSharedRef< FSlateShaderResourceManager > &InResourceManager)
 
virtual bool Initialize () override
 
virtual void Destroy () override
 
virtual FSlateDrawBufferAcquireDrawBuffer () override
 
virtual void ReleaseDrawBuffer (FSlateDrawBuffer &InWindowDrawBuffer) override
 
virtual void OnWindowDestroyed (const TSharedRef< SWindow > &InWindow) override
 
virtual void RequestResize (const TSharedPtr< SWindow > &Window, uint32 NewWidth, uint32 NewHeight) override
 
virtual void CreateViewport (const TSharedRef< SWindow > Window) override
 
virtual void UpdateFullscreenState (const TSharedRef< SWindow > Window, uint32 OverrideResX, uint32 OverrideResY) override
 
virtual void SetSystemResolution (uint32 Width, uint32 Height) override
 
virtual void RestoreSystemResolution (const TSharedRef< SWindow > InWindow) override
 
virtual void DrawWindows (FSlateDrawBuffer &InWindowDrawBuffer) override
 
virtual void ReleaseDynamicResource (const FSlateBrush &InBrush) override
 
virtual void RemoveDynamicBrushResource (TSharedPtr< FSlateDynamicImageBrush > BrushToRemove) override
 
virtual FIntPoint GenerateDynamicImageResource (const FName InTextureName) override
 
virtual bool GenerateDynamicImageResource (FName ResourceName, uint32 Width, uint32 Height, const TArray< uint8 > &Bytes) override
 
virtual void PrepareToTakeScreenshot (const FIntRect &Rect, TArray< FColor > *OutColorData, SWindow *InScreenshotWindow) override
 
virtual FSlateResourceHandle GetResourceHandle (const FSlateBrush &Brush, FVector2f LocalSize, float DrawScale) override
 
virtual FSlateUpdatableTextureCreateUpdatableTexture (uint32 Width, uint32 Height) override
 
virtual FSlateUpdatableTextureCreateSharedHandleTexture (void *SharedHandle) override
 
virtual void ReleaseUpdatableTexture (FSlateUpdatableTexture *Texture) override
 
virtual FCriticalSectionGetResourceCriticalSection () override
 
virtual int32 RegisterCurrentScene (FSceneInterface *Scene) override
 
virtual int32 GetCurrentSceneIndex () const override
 
virtual void SetCurrentSceneIndex (int32 InIndex) override
 
virtual void ClearScenes () override
 
virtual void Sync () const override
 
- Public Member Functions inherited from FSlateRenderer
SLATECORE_API FSlateRenderer (const TSharedRef< FSlateFontServices > &InSlateFontServices)
 
virtual SLATECORE_API ~FSlateRenderer ()
 
virtual FSlateDrawBufferGetDrawBuffer ()
 
 DECLARE_MULTICAST_DELEGATE_TwoParams (FOnSlateWindowRendered, SWindow &, void *)
 
FOnSlateWindowRenderedOnSlateWindowRendered ()
 
 DECLARE_MULTICAST_DELEGATE_OneParam (FOnSlateWindowDestroyed, void *)
 
FOnSlateWindowDestroyedOnSlateWindowDestroyed ()
 
 DECLARE_MULTICAST_DELEGATE_OneParam (FOnPreResizeWindowBackbuffer, void *)
 
FOnPreResizeWindowBackbufferOnPreResizeWindowBackBuffer ()
 
 DECLARE_MULTICAST_DELEGATE_OneParam (FOnPostResizeWindowBackbuffer, void *)
 
FOnPostResizeWindowBackbufferOnPostResizeWindowBackBuffer ()
 
 DECLARE_TS_MULTICAST_DELEGATE_TwoParams (FOnBackBufferReadyToPresent, SWindow &, const FTextureRHIRef &)
 
FOnBackBufferReadyToPresentOnBackBufferReadyToPresent ()
 
 DECLARE_TS_MULTICAST_DELEGATE_ThreeParams (FOnAddBackBufferReadyToPresentPass, FRDGBuilder &, SWindow &, FRDGTexture *)
 
FOnAddBackBufferReadyToPresentPassOnAddBackBufferReadyToPresentPass ()
 
virtual void SetColorVisionDeficiencyType (EColorVisionDeficiency Type, int32 Severity, bool bCorrectDeficiency, bool bShowCorrectionWithDeficiency)
 
virtual bool GenerateDynamicImageResource (FName ResourceName, FSlateTextureDataRef TextureData)
 
virtual FSlateResourceHandle GetResourceHandle (const FSlateBrush &Brush)
 
virtual bool CanRenderResource (UObject &InResourceObject) const
 
virtual void OnWindowFinishReshaped (const TSharedPtr< SWindow > &InWindow)
 
virtual voidGetViewportResource (const SWindow &Window)
 
TSharedRef< FSlateFontServicesGetFontServices () const
 
TSharedRef< class FSlateFontMeasureGetFontMeasureService () const
 
TSharedRef< class FSlateFontCacheGetFontCache () const
 
void FlushFontCache (const FString &FlushReason)
 
virtual void FlushCommands () const
 
virtual void BeginFrame () const
 
virtual void EndFrame () const
 
virtual void ReloadTextureResources ()
 
virtual void LoadStyleResources (const ISlateStyle &Style)
 
SLATECORE_API bool IsViewportFullscreen (const SWindow &Window) const
 
virtual bool AreShadersInitialized () const
 
virtual void InvalidateAllViewports ()
 
virtual void ReleaseAccessedResources (bool bImmediatelyFlush)
 
virtual void PrepareToTakeHDRScreenshot (const FIntRect &Rect, TArray< FLinearColor > *OutColorData, SWindow *InScreenshotWindow)
 
virtual void SetWindowRenderTarget (const SWindow &Window, class IViewportRenderTargetProvider *Provider)
 
virtual SLATECORE_API ISlateAtlasProviderGetTextureAtlasProvider ()
 
virtual SLATECORE_API ISlateAtlasProviderGetFontAtlasProvider ()
 
virtual void CopyWindowsToVirtualScreenBuffer (const TArray< FString > &KeypressBuffer)
 
virtual void MapVirtualScreenBuffer (FMappedTextureBuffer *OutImageData)
 
virtual void UnmapVirtualScreenBuffer ()
 
virtual SLATECORE_API void DestroyCachedFastPathRenderingData (struct FSlateCachedFastPathRenderingData *VertexData)
 
virtual SLATECORE_API void DestroyCachedFastPathElementData (struct FSlateCachedElementData *ElementData)
 
virtual bool HasLostDevice () const
 
virtual void AddWidgetRendererUpdate (const struct FRenderThreadUpdateContext &Context, bool bDeferredRenderTargetUpdate)
 
virtual EPixelFormat GetSlateRecommendedColorFormat ()
 
virtual void OnVirtualDesktopSizeChanged (const FDisplayMetrics &NewDisplayMetric)
 

Additional Inherited Members

- Protected Attributes inherited from FSlateRenderer
TSharedPtr< FSlateFontServicesSlateFontServices
 
FOnSlateWindowRendered SlateWindowRendered
 
FOnSlateWindowDestroyed OnSlateWindowDestroyedDelegate
 
FOnPreResizeWindowBackbuffer PreResizeBackBufferDelegate
 
FOnPostResizeWindowBackbuffer PostResizeBackBufferDelegate
 
FOnBackBufferReadyToPresent OnBackBufferReadyToPresentDelegate
 
FOnAddBackBufferReadyToPresentPass OnAddBackBufferReadyToPresentPassDelegate
 
FCriticalSection ResourceCriticalSection
 

Detailed Description

A slate null rendering implementation

Constructor & Destructor Documentation

◆ FSlateNullRenderer()

FSlateNullRenderer::FSlateNullRenderer ( const TSharedRef< FSlateFontServices > &  InSlateFontServices,
const TSharedRef< FSlateShaderResourceManager > &  InResourceManager 
)

Member Function Documentation

◆ AcquireDrawBuffer()

FSlateDrawBuffer & FSlateNullRenderer::AcquireDrawBuffer ( )
overridevirtual

Returns a draw buffer that can be used by Slate windows to draw window elements

Implements FSlateRenderer.

◆ ClearScenes()

void FSlateNullRenderer::ClearScenes ( )
overridevirtual

Reset the internal Scene tracking.

Implements FSlateRenderer.

◆ CreateSharedHandleTexture()

FSlateUpdatableTexture * FSlateNullRenderer::CreateSharedHandleTexture ( void SharedHandle)
overridevirtual

Create an updatable texture that can receive new data via a shared handle

Parameters
SharedHandleThe OS dependant handle that backs the texture data
Returns
Newly created updatable texture

Implements FSlateRenderer.

◆ CreateUpdatableTexture()

FSlateUpdatableTexture * FSlateNullRenderer::CreateUpdatableTexture ( uint32  Width,
uint32  Height 
)
overridevirtual

Create an updatable texture that can receive new data dynamically

Parameters
WidthInitial width of the texture
HeightInitial height of the texture
Returns
Newly created updatable texture

Implements FSlateRenderer.

◆ CreateViewport()

void FSlateNullRenderer::CreateViewport ( const TSharedRef< SWindow InWindow)
overridevirtual

Creates a rendering viewport

Parameters
InWindowThe window to create the viewport for

Implements FSlateRenderer.

◆ Destroy()

void FSlateNullRenderer::Destroy ( )
overridevirtual

Implements FSlateRenderer.

◆ DrawWindows()

void FSlateNullRenderer::DrawWindows ( FSlateDrawBuffer InWindowDrawBuffer)
overridevirtual

Creates necessary resources to render a window and sends draw commands to the rendering thread

Parameters
WindowDrawBufferThe buffer containing elements to draw

Implements FSlateRenderer.

◆ GenerateDynamicImageResource() [1/2]

FIntPoint FSlateNullRenderer::GenerateDynamicImageResource ( const FName  InTextureName)
overridevirtual

Creates a dynamic image resource and returns its size

Parameters
InTextureNameThe name of the texture resource
Returns
The size of the loaded texture

Reimplemented from FSlateRenderer.

◆ GenerateDynamicImageResource() [2/2]

bool FSlateNullRenderer::GenerateDynamicImageResource ( FName  ResourceName,
uint32  Width,
uint32  Height,
const TArray< uint8 > &  Bytes 
)
overridevirtual

Creates a dynamic image resource

Parameters
ResourceNameThe name of the texture resource
WidthThe width of the resource
HeightThe height of the image
BytesThe payload for the resource
Returns
true if the resource was successfully generated, otherwise false

Reimplemented from FSlateRenderer.

◆ GetCurrentSceneIndex()

int32 FSlateNullRenderer::GetCurrentSceneIndex ( ) const
overridevirtual

Get the currently registered scene index (set by RegisterCurrentScene)

Implements FSlateRenderer.

◆ GetResourceCriticalSection()

FCriticalSection * FSlateNullRenderer::GetResourceCriticalSection ( )
overridevirtual

Necessary to grab before flushing the resource pool, as it may be being accessed by multiple threads when loading.

Implements FSlateRenderer.

◆ GetResourceHandle()

FSlateResourceHandle FSlateNullRenderer::GetResourceHandle ( const FSlateBrush Brush,
FVector2f  LocalSize,
float  DrawScale 
)
overridevirtual

Implements FSlateRenderer.

◆ Initialize()

bool FSlateNullRenderer::Initialize ( )
overridevirtual

FSlateRenderer interface

Implements FSlateRenderer.

◆ OnWindowDestroyed()

void FSlateNullRenderer::OnWindowDestroyed ( const TSharedRef< SWindow > &  InWindow)
overridevirtual

Called when a window is destroyed to give the renderer a chance to free resources

Implements FSlateRenderer.

◆ PrepareToTakeScreenshot()

void FSlateNullRenderer::PrepareToTakeScreenshot ( const FIntRect Rect,
TArray< FColor > *  OutColorData,
SWindow InScreenshotWindow 
)
overridevirtual

Prepares the renderer to take a screenshot of the UI. The Rect is portion of the rendered output that will be stored into the TArray of FColors.

Reimplemented from FSlateRenderer.

◆ RegisterCurrentScene()

int32 FSlateNullRenderer::RegisterCurrentScene ( FSceneInterface Scene)
overridevirtual

Register the active scene pointer with the renderer. This will return the scene internal index that will be used for all subsequent elements drawn.

Implements FSlateRenderer.

◆ ReleaseDrawBuffer()

void FSlateNullRenderer::ReleaseDrawBuffer ( FSlateDrawBuffer InWindowDrawBuffer)
overridevirtual

Return the previously acquired buffer.

Implements FSlateRenderer.

◆ ReleaseDynamicResource()

void FSlateNullRenderer::ReleaseDynamicResource ( const FSlateBrush Brush)
overridevirtual

Releases a specific resource.
It is unlikely that you want to call this directly. Use RemoveDynamicBrushResource instead

Implements FSlateRenderer.

◆ ReleaseUpdatableTexture()

void FSlateNullRenderer::ReleaseUpdatableTexture ( FSlateUpdatableTexture Texture)
overridevirtual

Return an updatable texture to the renderer for release

Parameters
TextureThe texture we are releasing (should not use this pointer after calling)

Implements FSlateRenderer.

◆ RemoveDynamicBrushResource()

void FSlateNullRenderer::RemoveDynamicBrushResource ( TSharedPtr< FSlateDynamicImageBrush BrushToRemove)
overridevirtual

Queues a dynamic brush for removal when it is safe. The brush is not immediately released but you should consider the brush destroyed and no longer usable

Parameters
BrushToRemoveThe brush to queue for removal which is no longer valid to use

Implements FSlateRenderer.

◆ RequestResize()

void FSlateNullRenderer::RequestResize ( const TSharedPtr< SWindow > &  InWindow,
uint32  NewSizeX,
uint32  NewSizeY 
)
overridevirtual

Requests that a rendering viewport be resized

Parameters
WindowThe window to resize
WidthThe new width of the window
HeightThe new height of the window

Implements FSlateRenderer.

◆ RestoreSystemResolution()

void FSlateNullRenderer::RestoreSystemResolution ( const TSharedRef< SWindow InWindow)
overridevirtual

Restore the given window to the resolution settings currently cached by the engine

Parameters
InWindow-> The window to restore to the cached settings

Implements FSlateRenderer.

◆ SetCurrentSceneIndex()

void FSlateNullRenderer::SetCurrentSceneIndex ( int32  InIndex)
overridevirtual

Set currently registered scene index

Implements FSlateRenderer.

◆ SetSystemResolution()

virtual void FSlateNullRenderer::SetSystemResolution ( uint32  Width,
uint32  Height 
)
inlineoverridevirtual

Set the resolution cached by the engine

Parameters
WidthWidth of the system resolution
HeightHeight of the system resolution

Implements FSlateRenderer.

◆ Sync()

void FSlateNullRenderer::Sync ( ) const
overridevirtual

Gives the renderer a chance to synchronize with another thread in the event that the renderer runs in a multi-threaded environment. This function does not return until the sync is complete

Reimplemented from FSlateRenderer.

◆ UpdateFullscreenState()

void FSlateNullRenderer::UpdateFullscreenState ( const TSharedRef< SWindow InWindow,
uint32  OverrideResX,
uint32  OverrideResY 
)
overridevirtual

Sets fullscreen state on the window's rendering viewport

Parameters
InWindowThe window to update fullscreen state on
OverrideResX0 if no override
OverrideResY0 if no override

Implements FSlateRenderer.


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