Navigation
API > API/Runtime > API/Runtime/Engine
Platform-specific data used by the texture resource at runtime.
| Name | FTexturePlatformData |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/Texture.h |
| Include Path | #include "Engine/Texture.h" |
Syntax
USTRUCT ()
struct FTexturePlatformData
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTexturePlatformData() |
Default constructor. | Engine/Texture.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FTexturePlatformData() |
Destructor. | Engine/Texture.h |
Structs
| Name | Remarks |
|---|---|
| FStructuredDerivedDataKey | |
| FTextureEncodeResultMetadata | Stores information about how we generated this encoded texture. |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| BitMask_CubeMap | uint32 | Engine/Texture.h | |
| BitMask_HasCpuCopy | uint32 | Engine/Texture.h | |
| BitMask_HasOptData | uint32 | Engine/Texture.h | |
| BitMask_NumSlices | uint32 | Engine/Texture.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AsyncTask | FTextureAsyncCacheDerivedDataTask * | Async cache task if one is outstanding. | Engine/Texture.h | |
| CPUCopy | TRefCountPtr< const struct FSharedImage > | This is only valid if the texture availability is CPU only, see GetHasCpuCopy() | Engine/Texture.h | |
| DerivedDataKey | TVariant< FString, UE::DerivedData::FCacheKeyProxy > | The key associated with this derived data. | Engine/Texture.h | |
| FetchFirstDerivedDataKey | TVariant< FString, FStructuredDerivedDataKey > | Engine/Texture.h | ||
| FetchOrBuildDerivedDataKey | TVariant< FString, FStructuredDerivedDataKey > | The keys for both types of fetches. | Engine/Texture.h | |
| Mips | TIndirectArray< struct FTexture2DMipMap > | Mip data or VT data. one or the other. | Engine/Texture.h | |
| OptData | FOptTexturePlatformData | Additional data required by some platforms. | Engine/Texture.h | |
| PackedData | uint32 | Packed bits [b31: CubeMap], [b30: HasOptData], [b29-0: NumSlices]. See bit masks below. | Engine/Texture.h | |
| PixelFormat | EPixelFormat | Format in which mip data is stored. | Engine/Texture.h | |
| PreEncodeMipsHash | uint64 | When in the editor we have some data that is stored in the derived data that we don't want to save in the runtime cooked data: | Engine/Texture.h | |
| ResultMetadata | FTextureEncodeResultMetadata | Engine/Texture.h | ||
| SizeX | int32 | Width of the texture. | Engine/Texture.h | |
| SizeY | int32 | Height of the texture. | Engine/Texture.h | |
| VTData | FVirtualTextureBuiltData * | Engine/Texture.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AreDerivedMipsAvailable
(
FStringView Context |
Engine/Texture.h | ||
bool AreDerivedMipsAvailable () |
Engine/Texture.h | ||
bool AreDerivedVTChunksAvailable () |
Engine/Texture.h | ||
bool AreDerivedVTChunksAvailable
(
FStringView Context |
Engine/Texture.h | ||
void Cache
(
UTexture& InTexture, |
Compresses the texture using the given compressor and adds the result to the DDC. | Engine/Texture.h | |
bool CanBeLoaded() |
Return true if at least one mip can be loaded either from DDC or disk. | Engine/Texture.h | |
void CancelCache() |
Engine/Texture.h | ||
void FinishCache() |
Engine/Texture.h | ||
FString GetDerivedDataMipKeyString
(
int32 MipIndex, |
Engine/Texture.h | ||
int32 GetExtData() |
Engine/Texture.h | ||
bool GetHasCpuCopy() |
Engine/Texture.h | ||
bool GetHasOptData() |
Engine/Texture.h | ||
EPixelFormat GetLayerPixelFormat
(
uint32 LayerIndex |
Engine/Texture.h | ||
int32 GetNumMipsInTail() |
Engine/Texture.h | ||
int32 GetNumNonOptionalMips() |
Return the number of mips that streamable but not optional. | Engine/Texture.h | |
int32 GetNumNonStreamingMips
(
bool bIsStreamingPossible |
Return the number of mips that are not streamable. | Engine/Texture.h | |
int32 GetNumSlices() |
Engine/Texture.h | ||
int32 GetNumVTMips() |
Only because we don't want to expose FVirtualTextureBuiltData. | Engine/Texture.h | |
int64 GetPayloadSize
(
int32 MipBias |
Return the size of the texture pixel data in bytes, not including headers or alignment. | Engine/Texture.h | |
bool IsAsyncWorkComplete() |
Engine/Texture.h | ||
bool IsCubemap() |
Engine/Texture.h | ||
bool IsReadyForAsyncPostLoad() |
Return whether TryLoadMips() would stall because async loaded mips are not yet available. | Engine/Texture.h | |
TFuture< TTuple< uint64, uint64 > > LaunchEstimateOnDiskSizeTask
(
FOodleDataCompression::ECompressor InOodleCompressor, |
Engine/Texture.h | ||
void Reset() |
Clears the data such that a new Cache() call can load new data in to the structure. | Engine/Texture.h | |
| Serialization. | Engine/Texture.h | ||
| Serialization for cooked builds. | Engine/Texture.h | ||
void SetHasCpuCopy
(
bool bInHasCpuCopy |
Engine/Texture.h | ||
void SetIsCubemap
(
bool bCubemap |
Engine/Texture.h | ||
void SetNumSlices
(
int32 NumSlices |
Engine/Texture.h | ||
void SetOptData
(
FOptTexturePlatformData Data |
Engine/Texture.h | ||
void SetPackedData
(
int32 InNumSlices, |
Engine/Texture.h | ||
bool TryCancelCache() |
Engine/Texture.h | ||
bool TryInlineMipData
(
int32 FirstMipToLoad, |
Engine/Texture.h | ||
bool TryLoadMips
(
int32 FirstMipToLoad, |
Try to load mips from the derived data cache. | Engine/Texture.h | |
bool TryLoadMipsWithSizes
(
int32 FirstMipToLoad, |
Engine/Texture.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static UE::DerivedData::FValueId MakeMipId
(
int32 MipIndex |
Engine/Texture.h |