FTexturePlatformData

Platform-specific data used by the texture resource at runtime.

Choose your operating system:

Windows

macOS

Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/Texture.h

Include

#include "Engine/Texture.h"

Syntax

struct FTexturePlatformData

Remarks

Platform-specific data used by the texture resource at runtime.

Variables

Name Description

Public variable

FTextureAsyncCa...

 

AsyncTask

Async cache task if one is outstanding.

Public variable

TVariant< FStri...

 

DerivedDataKey

The key associated with this derived data.

Public variable

TVariant< FStri...

 

FetchOrBuildDerivedDataKey

This is the key for the FetchOrBuild variant of our Cache.

Public variable

TIndirectArray<...

 

Mips

Mip data or VT data. one or the other.

Public variable

FOptTexturePlat...

 

OptData

Additional data required by some platforms.

Public variable

uint32

 

PackedData

Packed bits [b31: CubeMap], [b30: HasOptData], [b29-0: NumSlices]. See bit masks below.

Public variable

EPixelFormat

 

PixelFormat

Format in which mip data is stored.

Public variable

FTextureEncodeR...

 

ResultMetadata

Public variable

int32

 

SizeX

Width of the texture.

Public variable

int32

 

SizeY

Height of the texture.

Public variable

FVirtualTexture...

 

VTData

Constructors

Name Description

Public function

FTexturePlatformData()

Default constructor.

Destructors

Name Description

Public function

~FTexturePlatformData()

Destructor.

Functions

Name Description

Public function Const

bool

 

AreDerivedMipsAvailable

(
    FStringView Context
)

Public function Const

bool

 

AreDerivedVTChunksAvailable

(
    FStringView Context
)

Public function

void

 

Cache

(
    UTexture& InTexture,
    const FTextureBuildSettings* I...,
    const FTextureBuildSettings* I...,
    const FTexturePlatformData::FTextur...,
    const FTexturePlatformData::FTextur...,
    uint32 InFlags,
    ITextureCompressorModule* Comp...
)

Compresses the texture using the given compressor and adds the result to the DDC.

Public function Const

bool

 

CanBeLoaded()

Return true if at least one mip can be loaded either from DDC or disk.

Public function

void

 

CancelCache()

Public function

void

 

FinishCache()

Public function Const

FString

 

GetDerivedDataMipKeyString

(
    int32 MipIndex,
    const FTexture2DMipMap& Mip
)

Public function Const

int32

 

GetExtData()

Public function Const

bool

 

GetHasOptData()

Public function Const

EPixelFormat

 

GetLayerPixelFormat

(
    uint32 LayerIndex
)

Public function Const

int32

 

GetNumMipsInTail()

Public function Const

int32

 

GetNumNonOptionalMips()

Return the number of mips that streamable but not optional.

Public function Const

int32

 

GetNumNonStreamingMips()

Return the number of mips that are not streamable.

Public function Const

int32

 

GetNumSlices()

Public function Const

int32

 

GetNumVTMips()

Only because we don't want to expose FVirtualTextureBuiltData.

Public function Const

bool

 

IsAsyncWorkComplete()

Public function Const

bool

 

IsCubemap()

Public function Const

bool

 

IsReadyForAsyncPostLoad()

Return whether TryLoadMips() would stall because async loaded mips are not yet available.

Public function Static

bool

 

IsUsingNewDerivedData()

Public function

TFuture< TTu...

 

LaunchEstimateOnDiskSizeTask

(
    FOodleDataCompression::ECompressor ...,
    FOodleDataCompression::ECompression...,
    uint32 InCompressionBlockSize,
    FStringView InDebugContext
)

Public function Static

UE::DerivedD...

 

MakeMipId

(
    int32 MipIndex
)

Public function

void

 

Serialize

(
    FArchive& Ar,
    UTexture* Owner
)

Serialization.

Public function

void

 

SerializeCooked

(
    FArchive& Ar,
    UTexture* Owner,
    bool bStreamable
)

Serialization for cooked builds.

Public function

void

 

SetIsCubemap

(
    bool bCubemap
)

Public function

void

 

SetNumSlices

(
    int32 NumSlices
)

Public function

void

 

SetOptData

(
    FOptTexturePlatformData Data
)

Public function

bool

 

TryCancelCache()

Public function

bool

 

TryInlineMipData

(
    int32 FirstMipToLoad,
    FStringView DebugContext
)

Public function

bool

 

TryLoadMips

(
    int32 FirstMipToLoad,
    void** OutMipData,
    FStringView DebugContext
)

Try to load mips from the derived data cache.

Classes

Name

Description

Public struct

FStructuredDerivedDataKey

Public struct

FTextureEncodeResultMetadata

Stores information about how we generated this encoded texture.

Constants

Deprecated Functions

Name Description

Public function Const

bool

 

AreDerivedMipsAvailable()

Use AreDerivedMipsAvailable with the context instead.

Public function Const

bool

 

AreDerivedVTChunksAvailable()

Use AreDerivedVTChunksAvailable with the context instead.