![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <TextureAtlas.h>
Inheritance diagram for FSlateTextureAtlas:Classes | |
| struct | FCopyRowData |
Public Member Functions | |
| SLATECORE_API | FSlateTextureAtlas (uint32 InWidth, uint32 InHeight, uint32 InBytesPerPixel, ESlateTextureAtlasPaddingStyle InPaddingStyle, bool bInUpdatesAfterInitialization) |
| virtual SLATECORE_API | ~FSlateTextureAtlas () |
| SLATECORE_API void | EmptyAtlasData () |
| SLATECORE_API const FAtlasedTextureSlot * | AddTexture (uint32 TextureWidth, uint32 TextureHeight, const TArray< uint8 > &Data) |
| uint32 | GetWidth () const |
| uint32 | GetHeight () const |
| SLATECORE_API void | MarkTextureDirty () |
| virtual void | ConditionalUpdateTexture ()=0 |
| virtual void | ReleaseResources ()=0 |
| virtual FSlateShaderResource * | GetAtlasTexture () const =0 |
Protected Member Functions | |
| SLATECORE_API const FAtlasedTextureSlot * | FindSlotForTexture (uint32 InWidth, uint32 InHeight) |
| void | AddFreeSlot (uint32 InX, uint32 InY, uint32 InWidth, uint32 InHeight) |
| SLATECORE_API void | InitAtlasData () |
| SLATECORE_API void | CopyRow (const FCopyRowData &CopyRowData) |
| SLATECORE_API void | ZeroRow (const FCopyRowData &CopyRowData) |
| SLATECORE_API void | CopyDataIntoSlot (const FAtlasedTextureSlot *SlotToCopyTo, const TArray< uint8 > &Data) |
Static Protected Member Functions | |
| static int32 | GetFreeSlotSearchIndex (uint32 InWidth, uint32 InHeight) |
Base class texture atlases in Slate
| FSlateTextureAtlas::FSlateTextureAtlas | ( | uint32 | InWidth, |
| uint32 | InHeight, | ||
| uint32 | InBytesPerPixel, | ||
| ESlateTextureAtlasPaddingStyle | InPaddingStyle, | ||
| bool | bInUpdatesAfterInitialization | ||
| ) |
|
virtual |
|
protected |
Adds a new slot to the free slot list.
| const FAtlasedTextureSlot * FSlateTextureAtlas::AddTexture | ( | uint32 | TextureWidth, |
| uint32 | TextureHeight, | ||
| const TArray< uint8 > & | Data | ||
| ) |
Adds a texture to the atlas
| TextureWidth | Width of the texture |
| TextureHeight | Height of the texture |
| Data | Raw texture data |
Updates the texture used for rendering if needed
Implemented in FSlateTextureAtlasRHI, FSlateFontAtlasNull, and FSlateFontAtlasRHI.
|
protected |
Copies texture data into the atlas at a given slot
| SlotToCopyTo | The occupied slot in the atlas where texture data should be copied to |
| Data | The data to copy into the atlas |
|
protected |
Copies a single row from a source texture to a dest texture, respecting the padding.
| CopyRowData | Information for how to copy a row |
| void FSlateTextureAtlas::EmptyAtlasData | ( | ) |
Clears atlas cpu data. It does not clear rendering data
|
protected |
Finds the optimal slot for a texture in the atlas
| Width | The width of the texture we are adding |
| Height | The height of the texture we are adding |
|
pure virtual |
Implemented in FSlateFontAtlas, and FSlateTextureAtlasRHI.
|
staticprotected |
Get the index to start looking for a free slot.
|
inline |
|
inline |
|
protected |
Creates enough space for a single texture the width and height of the atlas
| void FSlateTextureAtlas::MarkTextureDirty | ( | ) |
Marks the texture as dirty and needing its rendering resources updated
Releases rendering resources of this texture
Implemented in FSlateFontAtlasNull, FSlateFontAtlasRHI, and FSlateTextureAtlasRHI.
|
protected |
Zeros out a row in the dest texture (used with PaddingStyle == PadWithZero). respecting the padding.
| CopyRowData | Information for how to copy a row |
|
protected |
The list of atlas slots pointing to empty texture data in the atlas
|
protected |
Height of the atlas
|
protected |
The type of thread that owns this atlas - this is the only thread that can safely update it NOTE: We don't use the thread ID here, as the render thread can be recreated if it gets suspended and resumed, giving it a new ID
|
protected |
The list of atlas slots pointing to used texture data in the atlas
|
protected |
Width of the atlas
|
protected |
True if this texture needs to have its rendering resources updated
|
protected |
True if this texture can update after initialziation and we should preserve the atlas slots and cpu memory
|
protected |
Bytes per pixel in the atlas
|
protected |
Padding style