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