UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FSlateShaderResourceManager Class Referenceabstract

#include <ShaderResourceManager.h>

+ Inheritance diagram for FSlateShaderResourceManager:

Public Member Functions

SLATECORE_API FSlateShaderResourceManager ()
 
virtual SLATECORE_API ~FSlateShaderResourceManager ()
 
virtual FSlateShaderResourceProxyGetShaderResource (const FSlateBrush &Brush, FVector2f LocalSize, float DrawScale)=0
 
virtual SLATECORE_API FSlateResourceHandle GetResourceHandle (const FSlateBrush &Brush, FVector2f LocalSize, float DrawScale)
 
virtual SLATECORE_API FSlateResourceHandle GetResourceHandle (const FSlateBrush &Brush)
 
virtual FSlateShaderResourceGetFontShaderResource (int32 InTextureAtlasIndex, FSlateShaderResource *FontTextureAtlas, const class UObject *FontMaterial)
 
virtual ISlateAtlasProviderGetTextureAtlasProvider ()=0
 

Protected Member Functions

void ClearTextureMap ()
 
FString GetResourcePath (const FSlateBrush &InBrush) const
 

Protected Attributes

TMap< FName, FSlateShaderResourceProxy * > ResourceMap
 

Detailed Description

Base texture manager class used by a Slate renderer to manage texture resources

Constructor & Destructor Documentation

◆ FSlateShaderResourceManager()

FSlateShaderResourceManager::FSlateShaderResourceManager ( )
default

◆ ~FSlateShaderResourceManager()

FSlateShaderResourceManager::~FSlateShaderResourceManager ( )
virtual

Member Function Documentation

◆ ClearTextureMap()

void FSlateShaderResourceManager::ClearTextureMap ( )
inlineprotected

◆ GetFontShaderResource()

virtual FSlateShaderResource * FSlateShaderResourceManager::GetFontShaderResource ( int32  InTextureAtlasIndex,
FSlateShaderResource FontTextureAtlas,
const class UObject FontMaterial 
)
inlinevirtual

Reimplemented in FSlateRHIResourceManager.

◆ GetResourceHandle() [1/2]

FSlateResourceHandle FSlateShaderResourceManager::GetResourceHandle ( const FSlateBrush Brush)
virtual

◆ GetResourceHandle() [2/2]

FSlateResourceHandle FSlateShaderResourceManager::GetResourceHandle ( const FSlateBrush Brush,
FVector2f  LocalSize,
float  DrawScale 
)
virtual

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. It will become invalid when a resource is destroyed It is expensive to create a resource so do not do it in time sensitive areas

Parameters
BrushThe brush to get a rendering resource handle
LocalSizeThe unscaled size of the draw element using this brush. This size is used to rescale vector graphics only
DrawScaleThe scale of the draw element using this brush. This scale is used to rescale vector graphics only
Returns
The created resource handle.

◆ GetResourcePath()

FString FSlateShaderResourceManager::GetResourcePath ( const FSlateBrush InBrush) const
inlineprotected

◆ GetShaderResource()

virtual FSlateShaderResourceProxy * FSlateShaderResourceManager::GetShaderResource ( const FSlateBrush Brush,
FVector2f  LocalSize,
float  DrawScale 
)
pure virtual

Returns a texture associated with the passed in name. Should return nullptr if not found

Implemented in FSlateNullShaderResourceManager, and FSlateRHIResourceManager.

◆ GetTextureAtlasProvider()

virtual ISlateAtlasProvider * FSlateShaderResourceManager::GetTextureAtlasProvider ( )
pure virtual

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

Implemented in FSlateNullShaderResourceManager, and FSlateRHIResourceManager.

Member Data Documentation

◆ ResourceMap

TMap<FName,FSlateShaderResourceProxy*> FSlateShaderResourceManager::ResourceMap
protected

Mapping of names to texture pointers


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