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

#include <SlateUpdatableTexture.h>

+ Inheritance diagram for FSlateUpdatableTexture:

Public Member Functions

virtual ~FSlateUpdatableTexture ()
 
virtual FSlateShaderResourceGetSlateResource ()=0
 
virtual FRenderResourceGetRenderResource ()
 
virtual void Cleanup ()=0
 
virtual void ResizeTexture (uint32 Width, uint32 Height)=0
 
virtual void UpdateTexture (const TArray< uint8 > &Bytes)=0
 
virtual void UpdateTextureThreadSafe (const TArray< uint8 > &Bytes)=0
 
virtual void UpdateTextureThreadSafeRaw (uint32 Width, uint32 Height, const void *Buffer, const FIntRect &Dirty=FIntRect())=0
 
virtual void UpdateTextureThreadSafeWithTextureData (FSlateTextureData *TextureData)=0
 
virtual void UpdateTextureThreadSafeWithKeyedTextureHandle (void *TextureHandle, int KeyLockVal, int KeyUnlockVal, const FIntRect &Dirty=FIntRect())=0
 

Detailed Description

An interface to deal with a slate texture that can be updated dynamically

Constructor & Destructor Documentation

◆ ~FSlateUpdatableTexture()

virtual FSlateUpdatableTexture::~FSlateUpdatableTexture ( )
inlinevirtual

Virtual destructor

Member Function Documentation

◆ Cleanup()

virtual void FSlateUpdatableTexture::Cleanup ( )
pure virtual

Deferred or Immediate cleanup of this data depending on what is required.

Implemented in FSlateTexture2DRHIRef.

◆ GetRenderResource()

virtual FRenderResource * FSlateUpdatableTexture::GetRenderResource ( )
inlinevirtual

Gets the interface to the underlying render resource (may not always be used)

Returns
FRenderResource* pointer to the render resource

Reimplemented in FSlateTexture2DRHIRef.

◆ GetSlateResource()

virtual FSlateShaderResource * FSlateUpdatableTexture::GetSlateResource ( )
pure virtual

Gets the interface to the underlying platform independent texture

Returns
FSlateShaderResource* pointer to the shader resource

Implemented in FSlateTexture2DRHIRef.

◆ ResizeTexture()

virtual void FSlateUpdatableTexture::ResizeTexture ( uint32  Width,
uint32  Height 
)
pure virtual

Resize the texture.

Parameters
WidthNew texture width
HeightNew texture height

Implemented in FSlateTexture2DRHIRef.

◆ UpdateTexture()

virtual void FSlateUpdatableTexture::UpdateTexture ( const TArray< uint8 > &  Bytes)
pure virtual

Updates the texture contents via a byte array. Note: This method is not thread safe so make sure you do not use the Bytes data on another after it is passed in

Parameters
BytesArray of texture data

Implemented in FSlateTexture2DRHIRef.

◆ UpdateTextureThreadSafe()

virtual void FSlateUpdatableTexture::UpdateTextureThreadSafe ( const TArray< uint8 > &  Bytes)
pure virtual

Updates the texture contents via a byte array making a copy first for thread safety

Parameters
BytesArray of texture data

Implemented in FSlateTexture2DRHIRef.

◆ UpdateTextureThreadSafeRaw()

virtual void FSlateUpdatableTexture::UpdateTextureThreadSafeRaw ( uint32  Width,
uint32  Height,
const void Buffer,
const FIntRect Dirty = FIntRect() 
)
pure virtual

Update the texture from a raw byte buffer. Should only be used when integrating with third party APIs that provide a raw pointer to texture data. This method does a copy of the buffer for thread safety. Will resize the texture if the passed in width and height is different from the current size. The passed in size must correspond to the size of the buffer and the data must be valid for the entire texture, even when passing in a Dirty rectangle, as the implementation may chose to copy a larger area than specified. The RHI renderer currently ignores the Dirty argument completely.

Parameters
WidthNew texture width
HeightNew texture height
BufferA void pointer to a byte buffer.
DirtyAn optional hint of the area to update. An empty rectangle means that the entire texture should be updated.

Implemented in FSlateTexture2DRHIRef.

◆ UpdateTextureThreadSafeWithKeyedTextureHandle()

virtual void FSlateUpdatableTexture::UpdateTextureThreadSafeWithKeyedTextureHandle ( void TextureHandle,
int  KeyLockVal,
int  KeyUnlockVal,
const FIntRect Dirty = FIntRect() 
)
pure virtual

Update the texture from a shared texture handle. The handle type/usage is render system dependent, D3D uses the D3D11 OpenSharedResource call On macOS we use an IOSurface.

Parameters
TextureHandleA pointer to the opque texture handle provided by the OS.
DirtyAn optional hint of the area to update. An empty rectangle means that the entire texture should be updated.

Implemented in FSlateTexture2DRHIRef.

◆ UpdateTextureThreadSafeWithTextureData()

virtual void FSlateUpdatableTexture::UpdateTextureThreadSafeWithTextureData ( FSlateTextureData TextureData)
pure virtual

Update the texture from a provided FSlateTextureData buffer, also transferring ownership of the texture

Parameters
TextureDataA pointer to the provided FSlateTextureData.

NOTE: This function transfers ownership of the FSlateTextureData object. It will be deleted once the texture is used

Implemented in FSlateTexture2DRHIRef.


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