Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/FTexturePlatformData
Description
Compresses the texture using the given compressor and adds the result to the DDC. This might not be synchronous, and might be called from a worker thread!
If Compressor is 0, uses the default texture compressor module. Must be nonzero if called from a worker thread.
InFlags are ETextureCacheFlags. InSettingsPerLayerFetchFirst can be nullptr - if not, then the caceh will check if the corresponding texture exists in the DDC before trying the FetchOrBuild settings. FetchFirst is ignored if forcerebuild is passed as a flag. InSettingsPerLayerFetchOrBuild is required. If a texture matching the settings exists in the ddc, it is used, otherwise it is built.
| Name | Cache |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/Texture.h |
| Include Path | #include "Engine/Texture.h" |
| Source | /Engine/Source/Runtime/Engine/Private/TextureDerivedData.cpp |
void Cache
(
class UTexture & InTexture,
const FTextureBuildSettings * InSettingsPerLayerFetchFirst,
const FTextureBuildSettings * InSettingsPerLayerFetchOrBuild,
const FTexturePlatformData::FTextureEncodeResultMetadata * OutResultMetadataPerLayerFetchFirst,
const FTexturePlatformData::FTextureEncodeResultMetadata * OutResultMetadataPerLayerFetchOrBuild,
uint32 InFlags,
class ITextureCompressorModule * Compressor
)