FSlateTextureAtlas

Base class texture atlases in Slate

Windows
MacOS
Linux

Inheritance Hierarchy

FSlateTextureAtlas

FSlateFontAtlas

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Textures/TextureAtlas.h

Include

#include "Textures/TextureAtlas.h"

Syntax

class FSlateTextureAtlas

Remarks

Base class texture atlases in Slate

Variables

Name Description

Protected variable

TArray< uint8 >

 

AtlasData

Actual texture data contained in the atlas

Protected variable

FAtlasedTexture...

 

AtlasEmptySlots

The list of atlas slots pointing to empty texture data in the atlas

Protected variable

uint32

 

AtlasHeight

Height of the atlas

Protected variable

ESlateTextureAt...

 

AtlasOwnerThread

The type of thread that owns this atlas - this is the only thread that can safely update it

Protected variable

FAtlasedTexture...

 

AtlasUsedSlots

The list of atlas slots pointing to used texture data in the atlas

Protected variable

uint32

 

AtlasWidth

Width of the atlas

Protected variable

bool

 

bNeedsUpdate

True if this texture needs to have its rendering resources updated

Protected variable

bool

 

bUpdatesAfterInitialization

True if this texture can update after initialziation and we should preserve the atlas slots and cpu memory

Protected variable

uint32

 

BytesPerPixel

Bytes per pixel in the atlas

Protected variable

ESlateTextureAt...

 

PaddingStyle

Padding style

Constructors

Name Description

Public function

FSlateTextureAtlas

(
    uint32 InWidth,
    uint32 InHeight,
    uint32 InBytesPerPixel,
    ESlateTextureAtlasPaddingStyle InPa...,
    bool bInUpdatesAfterInitialization
)

Destructors

Name Description

Public function Virtual

~FSlateTextureAtlas()

Functions

Name Description

Public function

const FAtlas...

 

AddTexture

(
    uint32 TextureWidth,
    uint32 TextureHeight,
    const TArray< uint8 >& Data
)

Adds a texture to the atlas

Public function

void

 

ConditionalUpdateTexture()

Updates the texture used for rendering if needed

Protected function

void

 

CopyDataIntoSlot

(
    const FAtlasedTextureSlot* Slo...,
    const TArray< uint8 >& Data
)

Copies texture data into the atlas at a given slot

Protected function

void

 

CopyRow

(
    const FCopyRowData& CopyRowData
)

Copies a single row from a source texture to a dest texture, respecting the padding.

Public function

void

 

EmptyAtlasData()

Clears atlas cpu data. It does not clear rendering data

Protected function

const FAtlas...

 

FindSlotForTexture

(
    uint32 InWidth,
    uint32 InHeight
)

Finds the optimal slot for a texture in the atlas

Public function Const

uint32

 

GetHeight()

Public function Const

const FAtlas...

 

GetSlotAtPosition

(
    FIntPoint InPosition
)

Public function Const

uint32

 

GetWidth()

Protected function

void

 

InitAtlasData()

Creates enough space for a single texture the width and height of the atlas

Public function

void

 

MarkTextureDirty()

Marks the texture as dirty and needing its rendering resources updated

Protected function

void

 

ZeroRow

(
    const FCopyRowData& CopyRowData
)

Zeros out a row in the dest texture (used with PaddingStyle == PadWithZero).

Classes

Name

Description

Protected struct

FCopyRowData

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss