Navigation
API > API/Runtime > API/Runtime/SlateCore
Abstract base class for Slate renderers.
| Name | FSlateRenderer |
| Type | class |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Rendering/SlateRenderer.h |
| Include Path | #include "Rendering/SlateRenderer.h" |
Syntax
class FSlateRenderer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSlateRenderer
(
const FSlateRenderer& |
Non-copyable. | Rendering/SlateRenderer.h | |
FSlateRenderer
(
const TSharedRef< FSlateFontServices >& InSlateFontServices |
Constructor. | Rendering/SlateRenderer.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FSlateRenderer() |
Virtual destructor. | Rendering/SlateRenderer.h |
Structs
| Name | Remarks |
|---|---|
| FScopedAcquireDrawBuffer | Acquire the draw buffer and release it at the end of the scope. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnPostResizeWindowBackbuffer | TMulticastDelegate_OneParam< void, void * > | Called on the game thread right after a window backbuffer has been resized | Rendering/SlateRenderer.h |
| FOnPreResizeWindowBackbuffer | TMulticastDelegate_OneParam< void, void * > | Called on the game thread right before a window backbuffer is about to be resized | Rendering/SlateRenderer.h |
| FOnSlateWindowDestroyed | TMulticastDelegate_OneParam< void, void * > | Called on the game thread right before the slate window handle is destroyed. | Rendering/SlateRenderer.h |
| FOnSlateWindowRendered | TMulticastDelegate_TwoParams< void, SWindow &, void * > | Callback that fires after Slate has rendered each window, each frame | Rendering/SlateRenderer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSlateDrawBuffer & AcquireDrawBuffer() |
Returns a draw buffer that can be used by Slate windows to draw window elements | Rendering/SlateRenderer.h | |
virtual void AddWidgetRendererUpdate
(
const FRenderThreadUpdateContext& Context, |
Lets the renderer know that we need to render some widgets to a render target. | Rendering/SlateRenderer.h | |
virtual bool AreShadersInitialized() |
Returns whether shaders that Slate depends on have been compiled. | Rendering/SlateRenderer.h | |
virtual void BeginFrame () |
Indicates the start of a new frame to the Renderer. | Rendering/SlateRenderer.h | |
virtual bool CanRenderResource
(
UObject& InResourceObject |
The default implementation assumes all things are renderable. | Rendering/SlateRenderer.h | |
void ClearScenes() |
Reset the internal Scene tracking. | Rendering/SlateRenderer.h | |
| Copies all slate windows out to a buffer at half resolution with debug information like the mouse cursor and any keypresses. | Rendering/SlateRenderer.h | ||
FSlateUpdatableTexture * CreateSharedHandleTexture
(
void* SharedHandle |
Create an updatable texture that can receive new data via a shared handle | Rendering/SlateRenderer.h | |
FSlateUpdatableTexture * CreateUpdatableTexture
(
uint32 Width, |
Create an updatable texture that can receive new data dynamically | Rendering/SlateRenderer.h | |
void CreateViewport
(
const TSharedRef< SWindow > InWindow |
Creates a rendering viewport | Rendering/SlateRenderer.h | |
DECLARE_TS_MULTICAST_DELEGATE_ThreeParams
(
FOnAddBackBufferReadyToPresentPass, |
Callback on the render thread after slate rendering finishes and right before present is called. | Rendering/SlateRenderer.h | |
DECLARE_TS_MULTICAST_DELEGATE_TwoParams
(
FOnBackBufferReadyToPresent, |
Callback on the render thread after slate rendering finishes and right before present is called. | Rendering/SlateRenderer.h | |
void Destroy() |
Rendering/SlateRenderer.h | ||
virtual void DestroyCachedFastPathElementData
(
FSlateCachedElementData* ElementData |
Rendering/SlateRenderer.h | ||
virtual void DestroyCachedFastPathRenderingData
(
FSlateCachedFastPathRenderingData* VertexData |
Rendering/SlateRenderer.h | ||
void DrawWindows
(
FSlateDrawBuffer& InWindowDrawBuffer |
Creates necessary resources to render a window and sends draw commands to the rendering thread | Rendering/SlateRenderer.h | |
virtual void EndFrame () |
Indicates the end of the current frame to the Renderer. | Rendering/SlateRenderer.h | |
virtual void FlushCommands() |
Gives the renderer a chance to wait for any render commands to be completed before returning/ | Rendering/SlateRenderer.h | |
void FlushFontCache
(
const FString& FlushReason |
Flushes all cached data from the font cache for the current thread | Rendering/SlateRenderer.h | |
virtual bool GenerateDynamicImageResource
(
FName ResourceName, |
Creates a dynamic image resource | Rendering/SlateRenderer.h | |
virtual bool GenerateDynamicImageResource
(
FName ResourceName, |
Rendering/SlateRenderer.h | ||
virtual FIntPoint GenerateDynamicImageResource
(
const FName InTextureName |
Creates a dynamic image resource and returns its size | Rendering/SlateRenderer.h | |
int32 GetCurrentSceneIndex() |
Get the currently registered scene index (set by RegisterCurrentScene) | Rendering/SlateRenderer.h | |
virtual FSlateDrawBuffer & GetDrawBuffer() |
Returns a draw buffer that can be used by Slate windows to draw window elements | Rendering/SlateRenderer.h | |
virtual ISlateAtlasProvider * GetFontAtlasProvider() |
Returns the way to access the font atlas information for this renderer | Rendering/SlateRenderer.h | |
TSharedRef< class FSlateFontCache > GetFontCache() |
Get the font cache to use for the current thread | Rendering/SlateRenderer.h | |
TSharedRef< class FSlateFontMeasure > GetFontMeasureService() |
Get access to the font measure service (game thread only!) | Rendering/SlateRenderer.h | |
TSharedRef< FSlateFontServices > GetFontServices() |
Get access to the font services used by this renderer | Rendering/SlateRenderer.h | |
FCriticalSection * GetResourceCriticalSection() |
Necessary to grab before flushing the resource pool, as it may be being accessed by multiple threads when loading. | Rendering/SlateRenderer.h | |
virtual FSlateResourceHandle GetResourceHandle
(
const FSlateBrush& Brush |
Creates a handle to a Slate resource A handle is used as fast path for looking up a rendering resource for a given brush when adding Slate draw elements This can be cached and stored safely in code. | Rendering/SlateRenderer.h | |
FSlateResourceHandle GetResourceHandle
(
const FSlateBrush& Brush, |
Rendering/SlateRenderer.h | ||
virtual EPixelFormat GetSlateRecommendedColorFormat() |
Rendering/SlateRenderer.h | ||
virtual ISlateAtlasProvider * GetTextureAtlasProvider() |
Returns the way to access the texture atlas information for this renderer | Rendering/SlateRenderer.h | |
virtual void * GetViewportResource
(
const SWindow& Window |
Returns the viewport rendering resource (backbuffer) for the provided window | Rendering/SlateRenderer.h | |
virtual bool HasLostDevice() |
Rendering/SlateRenderer.h | ||
bool Initialize() |
Rendering/SlateRenderer.h | ||
virtual void InvalidateAllViewports () |
Removes references to FViewportRHI's. | Rendering/SlateRenderer.h | |
bool IsViewportFullscreen
(
const SWindow& Window |
Returns whether or not a viewport should be in fullscreen | Rendering/SlateRenderer.h | |
virtual void LoadStyleResources
(
const ISlateStyle& Style |
Loads all the resources used by the specified SlateStyle | Rendering/SlateRenderer.h | |
virtual void MapVirtualScreenBuffer
(
FMappedTextureBuffer* OutImageData |
Allows and disallows access to the crash tracker buffer data on the CPU | Rendering/SlateRenderer.h | |
FOnAddBackBufferReadyToPresentPass & OnAddBackBufferReadyToPresentPass() |
Rendering/SlateRenderer.h | ||
FOnBackBufferReadyToPresent & OnBackBufferReadyToPresent() |
Rendering/SlateRenderer.h | ||
FOnPostResizeWindowBackbuffer & OnPostResizeWindowBackBuffer() |
Rendering/SlateRenderer.h | ||
FOnPreResizeWindowBackbuffer & OnPreResizeWindowBackBuffer() |
Rendering/SlateRenderer.h | ||
FOnSlateWindowDestroyed & OnSlateWindowDestroyed() |
Rendering/SlateRenderer.h | ||
FOnSlateWindowRendered & OnSlateWindowRendered() |
Rendering/SlateRenderer.h | ||
virtual void OnVirtualDesktopSizeChanged
(
const FDisplayMetrics& NewDisplayMetric |
Rendering/SlateRenderer.h | ||
void OnWindowDestroyed
(
const TSharedRef< SWindow >& InWindow |
Called when a window is destroyed to give the renderer a chance to free resources | Rendering/SlateRenderer.h | |
virtual void OnWindowFinishReshaped
(
const TSharedPtr< SWindow >& InWindow |
Called when a window is finished being reshaped | Rendering/SlateRenderer.h | |
virtual void PrepareToTakeHDRScreenshot
(
const FIntRect& Rect, |
Prepares the renderer to take a screenshot of the UI. | Rendering/SlateRenderer.h | |
virtual void PrepareToTakeScreenshot
(
const FIntRect& Rect, |
Prepares the renderer to take a screenshot of the UI. | Rendering/SlateRenderer.h | |
int32 RegisterCurrentScene
(
FSceneInterface* Scene |
Register the active scene pointer with the renderer. | Rendering/SlateRenderer.h | |
virtual void ReleaseAccessedResources
(
bool bImmediatelyFlush |
A renderer may need to keep a cache of accessed garbage collectible objects alive for the duration of their usage. | Rendering/SlateRenderer.h | |
void ReleaseDrawBuffer
(
FSlateDrawBuffer& InWindowDrawBuffer |
Return the previously acquired buffer. | Rendering/SlateRenderer.h | |
void ReleaseDynamicResource
(
const FSlateBrush& Brush |
Releases a specific resource. | Rendering/SlateRenderer.h | |
void ReleaseUpdatableTexture
(
FSlateUpdatableTexture* Texture |
Return an updatable texture to the renderer for release | Rendering/SlateRenderer.h | |
virtual void ReloadTextureResources() |
Reloads all texture resources from disk | Rendering/SlateRenderer.h | |
void RemoveDynamicBrushResource
(
TSharedPtr< FSlateDynamicImageBrush > BrushToRemove |
Queues a dynamic brush for removal when it is safe. | Rendering/SlateRenderer.h | |
void RequestResize
(
const TSharedPtr< SWindow >& InWindow, |
Requests that a rendering viewport be resized | Rendering/SlateRenderer.h | |
void RestoreSystemResolution
(
const TSharedRef< SWindow > InWindow |
Restore the given window to the resolution settings currently cached by the engine | Rendering/SlateRenderer.h | |
virtual void SetColorVisionDeficiencyType
(
EColorVisionDeficiency Type, |
Sets which color vision filter to use | Rendering/SlateRenderer.h | |
void SetCurrentSceneIndex
(
int32 InIndex |
Set currently registered scene index | Rendering/SlateRenderer.h | |
void SetSystemResolution
(
uint32 Width, |
Set the resolution cached by the engine | Rendering/SlateRenderer.h | |
virtual void SetWindowRenderTarget
(
const SWindow& Window, |
Pushes the rendering of the specified window to the specified render target | Rendering/SlateRenderer.h | |
virtual void Sync () |
Gives the renderer a chance to synchronize with another thread in the event that the renderer runs in a multi-threaded environment. | Rendering/SlateRenderer.h | |
virtual void UnmapVirtualScreenBuffer() |
Rendering/SlateRenderer.h | ||
void UpdateFullscreenState
(
const TSharedRef< SWindow > InWindow, |
Sets fullscreen state on the window's rendering viewport | Rendering/SlateRenderer.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSlateRenderer & operator=
(
const FSlateRenderer& |
Rendering/SlateRenderer.h |