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

#include <SlateRHIResourceManager.h>

+ Inheritance diagram for FSlateRHIResourceManager:

Public Member Functions

 FSlateRHIResourceManager ()
 
virtual ~FSlateRHIResourceManager ()
 
virtual int32 GetNumAtlasPages () const override
 
virtual FSlateShaderResourceGetAtlasPageResource (const int32 InIndex) const override
 
virtual bool IsAtlasPageResourceAlphaOnly (const int32 InIndex) const override
 
virtual ETickableTickType GetTickableTickType () const override
 
virtual bool IsTickableWhenPaused () const override
 
virtual bool IsTickableInEditor () const override
 
virtual TStatId GetStatId () const override
 
virtual void Tick (float DeltaSeconds) override
 
void LoadUsedTextures ()
 
void LoadStyleResources (const ISlateStyle &Style)
 
void UpdateTextureAtlases ()
 
void ConditionalFlushAtlases ()
 
virtual FSlateShaderResourceProxyGetShaderResource (const FSlateBrush &InBrush, FVector2f LocalSize, float DrawScale) override
 
virtual FSlateShaderResourceGetFontShaderResource (int32 InTextureAtlasIndex, FSlateShaderResource *FontTextureAtlas, const class UObject *FontMaterial) override
 
virtual ISlateAtlasProviderGetTextureAtlasProvider () override
 
TSharedPtr< FSlateUTextureResourceMakeDynamicUTextureResource (UTexture *InTextureObject)
 
TSharedPtr< FSlateDynamicTextureResourceMakeDynamicTextureResource (FName ResourceName, uint32 Width, uint32 Height, const TArray< uint8 > &Bytes)
 
TSharedPtr< FSlateDynamicTextureResourceMakeDynamicTextureResource (FName ResourceName, FSlateTextureDataRef TextureData)
 
TSharedPtr< FSlateDynamicTextureResourceGetDynamicTextureResourceByName (FName ResourceName)
 
bool ContainsTexture (const FName &ResourceName) const
 
void ReleaseDynamicResource (const FSlateBrush &InBrush)
 
virtual bool LoadTexture (const FName &TextureName, const FString &ResourcePath, uint32 &Width, uint32 &Height, TArray< uint8 > &DecodedImage)
 
virtual bool LoadTexture (const FSlateBrush &InBrush, uint32 &Width, uint32 &Height, TArray< uint8 > &DecodedImage)
 
void ReleaseResources ()
 
void ReloadTextures ()
 
int32 GetSceneCount ()
 
FSceneInterfaceGetSceneAt (int32 Index)
 
void AddSceneAt (FSceneInterface *Scene, int32 Index)
 
void ClearScenes ()
 
FCriticalSectionGetResourceCriticalSection ()
 
- Public Member Functions inherited from ISlateAtlasProvider
virtual ~ISlateAtlasProvider ()
 
- Public Member Functions inherited from FSlateShaderResourceManager
SLATECORE_API FSlateShaderResourceManager ()
 
virtual SLATECORE_API ~FSlateShaderResourceManager ()
 
virtual SLATECORE_API FSlateResourceHandle GetResourceHandle (const FSlateBrush &Brush, FVector2f LocalSize, float DrawScale)
 
virtual SLATECORE_API FSlateResourceHandle GetResourceHandle (const FSlateBrush &Brush)
 
- Public Member Functions inherited from FTickableGameObject
 UE_NONCOPYABLE (FTickableGameObject)
 
ENGINE_API FTickableGameObject (ETickableTickType StartingTickType=ETickableTickType::NewObject)
 
virtual ENGINE_API ~FTickableGameObject ()
 
virtual UWorldGetTickableGameObjectWorld () const
 
ENGINE_API void SetTickableTickType (ETickableTickType NewTickType)
 
- Public Member Functions inherited from FTickableObjectBase
virtual bool IsTickable () const
 
virtual bool IsAllowedToTick () const
 

Additional Inherited Members

- Static Public Member Functions inherited from FTickableGameObject
static ENGINE_API void TickObjects (UWorld *World, ELevelTick LevelTickType, bool bIsPaused, float DeltaSeconds)
 
- Protected Member Functions inherited from FSlateShaderResourceManager
void ClearTextureMap ()
 
FString GetResourcePath (const FSlateBrush &InBrush) const
 
- Static Protected Member Functions inherited from FTickableObjectBase
static ENGINE_API void SimpleTickObjects (FTickableStatics &Statics, TFunctionRef< void(FTickableObjectBase *)> TickFunc)
 
- Protected Attributes inherited from FSlateShaderResourceManager
TMap< FName, FSlateShaderResourceProxy * > ResourceMap
 

Detailed Description

Stores a mapping of texture names to their RHI texture resource

Constructor & Destructor Documentation

◆ FSlateRHIResourceManager()

FSlateRHIResourceManager::FSlateRHIResourceManager ( )

◆ ~FSlateRHIResourceManager()

FSlateRHIResourceManager::~FSlateRHIResourceManager ( )
virtual

Member Function Documentation

◆ AddSceneAt()

void FSlateRHIResourceManager::AddSceneAt ( FSceneInterface Scene,
int32  Index 
)

◆ ClearScenes()

void FSlateRHIResourceManager::ClearScenes ( )

◆ ConditionalFlushAtlases()

void FSlateRHIResourceManager::ConditionalFlushAtlases ( )

◆ ContainsTexture()

bool FSlateRHIResourceManager::ContainsTexture ( const FName ResourceName) const

Returns true if a texture resource with the passed in resource name is available

◆ GetAtlasPageResource()

FSlateShaderResource * FSlateRHIResourceManager::GetAtlasPageResource ( const int32  InIndex) const
overridevirtual

Get the page resource for the given index (verify with GetNumAtlasPages)

Implements ISlateAtlasProvider.

◆ GetDynamicTextureResourceByName()

TSharedPtr< FSlateDynamicTextureResource > FSlateRHIResourceManager::GetDynamicTextureResourceByName ( FName  ResourceName)

Find a dynamic texture resource

Parameters
ResourceNameThe name identifier of the resource

◆ GetFontShaderResource()

FSlateShaderResource * FSlateRHIResourceManager::GetFontShaderResource ( int32  InTextureAtlasIndex,
FSlateShaderResource FontTextureAtlas,
const class UObject FontMaterial 
)
overridevirtual

Reimplemented from FSlateShaderResourceManager.

◆ GetNumAtlasPages()

int32 FSlateRHIResourceManager::GetNumAtlasPages ( ) const
overridevirtual

◆ GetResourceCriticalSection()

FCriticalSection * FSlateRHIResourceManager::GetResourceCriticalSection ( )
inline

◆ GetSceneAt()

FSceneInterface * FSlateRHIResourceManager::GetSceneAt ( int32  Index)

◆ GetSceneCount()

int32 FSlateRHIResourceManager::GetSceneCount ( )

◆ GetShaderResource()

FSlateShaderResourceProxy * FSlateRHIResourceManager::GetShaderResource ( const FSlateBrush InBrush,
FVector2f  LocalSize,
float  DrawScale 
)
overridevirtual

◆ GetStatId()

virtual TStatId FSlateRHIResourceManager::GetStatId ( ) const
inlineoverridevirtual

Return the stat id used to track the performance of this object

Implements FTickableObjectBase.

◆ GetTextureAtlasProvider()

ISlateAtlasProvider * FSlateRHIResourceManager::GetTextureAtlasProvider ( )
overridevirtual

Returns the way to access the texture atlas information from this resource manager

Implements FSlateShaderResourceManager.

◆ GetTickableTickType()

virtual ETickableTickType FSlateRHIResourceManager::GetTickableTickType ( ) const
inlineoverridevirtual

FTickableGameObject interface

Reimplemented from FTickableObjectBase.

◆ IsAtlasPageResourceAlphaOnly()

bool FSlateRHIResourceManager::IsAtlasPageResourceAlphaOnly ( const int32  InIndex) const
overridevirtual

Does the page resources for the given index only contain alpha information? This affects how the atlas visualizer will sample them (verify with GetNumAtlasPages)

Implements ISlateAtlasProvider.

◆ IsTickableInEditor()

virtual bool FSlateRHIResourceManager::IsTickableInEditor ( ) const
inlineoverridevirtual

Used to determine whether the object should be ticked in the editor when there is no gameplay world. Objects will still be ticked in Play in Editor if they are associated with a PIE world.

Returns
true if this tickable object should always be ticked in the editor, even if there is no gameplay world

Reimplemented from FTickableGameObject.

◆ IsTickableWhenPaused()

virtual bool FSlateRHIResourceManager::IsTickableWhenPaused ( ) const
inlineoverridevirtual

Used to determine if an object should be ticked when the game is paused. Defaults to false, as that mimics old behavior.

Returns
true if it should be ticked when paused, false otherwise

Reimplemented from FTickableGameObject.

◆ LoadStyleResources()

void FSlateRHIResourceManager::LoadStyleResources ( const ISlateStyle Style)

◆ LoadTexture() [1/2]

bool FSlateRHIResourceManager::LoadTexture ( const FName TextureName,
const FString &  ResourcePath,
uint32 OutWidth,
uint32 OutHeight,
TArray< uint8 > &  OutDecodedImage 
)
virtual

Creates a new texture from the given texture name

Parameters
TextureNameThe name of the texture to load

Loads a UTexture2D from a package and stores it in the cache

Parameters
TextureNameThe name of the texture to load

◆ LoadTexture() [2/2]

bool FSlateRHIResourceManager::LoadTexture ( const FSlateBrush InBrush,
uint32 Width,
uint32 Height,
TArray< uint8 > &  DecodedImage 
)
virtual

◆ LoadUsedTextures()

void FSlateRHIResourceManager::LoadUsedTextures ( )

Loads and creates rendering resources for all used textures.
In this implementation all textures must be known at startup time or they will not be found

◆ MakeDynamicTextureResource() [1/2]

TSharedPtr< FSlateDynamicTextureResource > FSlateRHIResourceManager::MakeDynamicTextureResource ( FName  ResourceName,
FSlateTextureDataRef  TextureData 
)

◆ MakeDynamicTextureResource() [2/2]

TSharedPtr< FSlateDynamicTextureResource > FSlateRHIResourceManager::MakeDynamicTextureResource ( FName  ResourceName,
uint32  Width,
uint32  Height,
const TArray< uint8 > &  Bytes 
)

Makes a dynamic texture resource and begins use of it

Parameters
ResourceNameThe name identifier of the resource
WidthThe width of the resource
HeightThe height of the resource
BytesThe payload containing the resource

◆ MakeDynamicUTextureResource()

TSharedPtr< FSlateUTextureResource > FSlateRHIResourceManager::MakeDynamicUTextureResource ( UTexture InTextureObject)

Makes a dynamic texture resource and begins use of it

Parameters
InTextureObjectThe texture object to create the resource from

◆ ReleaseDynamicResource()

void FSlateRHIResourceManager::ReleaseDynamicResource ( const FSlateBrush InBrush)

Releases a specific dynamic resource

◆ ReleaseResources()

void FSlateRHIResourceManager::ReleaseResources ( )

Releases rendering resources

◆ ReloadTextures()

void FSlateRHIResourceManager::ReloadTextures ( )

Reloads texture resources for all used textures.

Parameters
InExtraResourcesOptional list of textures to create that aren't in the style.

◆ Tick()

void FSlateRHIResourceManager::Tick ( float  DeltaTime)
overridevirtual

Pure virtual that must be overloaded by the inheriting class. It will be called at different times in the frame depending on the subclass.

Parameters
DeltaTimeGame time passed since the last call.

Implements FTickableObjectBase.

◆ UpdateTextureAtlases()

void FSlateRHIResourceManager::UpdateTextureAtlases ( )

Updates texture atlases if needed


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