Navigation
API > API/Developer > API/Developer/TextureFormat
Interface for texture compression modules.
Note that if you add any virtual functions to this, they almost certainly need to be plumbed through ChildTextureFormat! This is why the Format is passed around - ChildTextureFormat needs it to resolve to the base format.
| Name | ITextureFormat |
| Type | class |
| Header File | /Engine/Source/Developer/TextureFormat/Public/Interfaces/ITextureFormat.h |
| Include Path | #include "Interfaces/ITextureFormat.h" |
Syntax
class ITextureFormat
Derived Classes
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~ITextureFormat() |
Virtual destructor. | Interfaces/ITextureFormat.h |
Structs
| Name | Remarks |
|---|---|
| FTilerSettings | An object produced by PrepareTiling and used by SetTiling and CompressImageTiled. |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool AllowParallelBuild() |
Checks whether this texture format can compress in parallel. | Interfaces/ITextureFormat.h | |
virtual bool CanAcceptNonF32Source
(
FName Format |
Interfaces/ITextureFormat.h | ||
virtual bool CanDecodeFormat
(
EPixelFormat InPixelFormat |
Return true if this format can decode the given pixel format to one of the ERawImageFormats. | Interfaces/ITextureFormat.h | |
bool CompressImage
(
const FImage& Image, |
Compresses a single image. | Interfaces/ITextureFormat.h | |
virtual bool CompressImageEx
(
const FImage* Images, |
Compress an image (or images for a miptail) into a single mip blob. | Interfaces/ITextureFormat.h | |
virtual bool CompressImageTiled
(
const FImage* Images, |
Compress an image (or images for a miptail) into a single mip blob with device-specific tiling. | Interfaces/ITextureFormat.h | |
virtual bool DecodeImage
(
int32 InSizeX, |
Decodes an image encoded as a EPixelFormat into something encoded as a ERawImageFormat. | Interfaces/ITextureFormat.h | |
virtual FCbObject ExportGlobalFormatConfig
(
const FTextureBuildSettings& BuildSettings |
Obtains the current global format config object for this texture format. | Interfaces/ITextureFormat.h | |
virtual FString GetAlternateTextureFormatPrefix() |
If this is an Alternate Texture Format, return the prefix to apply | Interfaces/ITextureFormat.h | |
virtual const FChildTextureFormat * GetChildFormat() |
Interfaces/ITextureFormat.h | ||
virtual const FUtf8StringView GetDecodeBuildFunctionName() |
If the format can decode to RGBA8/RGBA16F, this is the IBuild function name for it. | Interfaces/ITextureFormat.h | |
virtual FString GetDerivedDataKeyString
(
const FTextureBuildSettings& InBuildSettings, |
Gets an optional derived data key string, so that the compressor can rely upon the number of mips, size of texture, etc, when compressing the image | Interfaces/ITextureFormat.h | |
virtual EPixelFormat GetEncodedPixelFormat
(
const FTextureBuildSettings& InBuildSettings, |
Returns what the compressed pixel format will be for a given format and the given settings. | Interfaces/ITextureFormat.h | |
FName GetEncoderName
(
FName Format |
Return the name of the encoder used for the given format.Used for debugging and UI. | Interfaces/ITextureFormat.h | |
virtual FEncodedTextureExtendedData GetExtendedDataForTexture
(
const FEncodedTextureDescription& InTextureDescription, |
Generate and return any out-of-band data that needs to be saved for a given encoded texture description. | Interfaces/ITextureFormat.h | |
virtual FTextureFormatCompressorCaps GetFormatCapabilities() |
Gets the capabilities of the texture compressor. | Interfaces/ITextureFormat.h | |
virtual FTextureFormatCompressorCaps GetFormatCapabilitiesEx
(
const FTextureBuildSettings& BuildSettings, |
Gets the capabilities of the texture compressor. | Interfaces/ITextureFormat.h | |
virtual FName GetLatestSdkVersion() |
Identify the latest sdk version for this texture encoder (note the SdkVersion is different than the TextureFormat Version) | Interfaces/ITextureFormat.h | |
virtual EPixelFormat GetPixelFormatForImage
(
const FTextureBuildSettings& BuildSettings, |
Calculate the final/runtime pixel format for this image on this platform | Interfaces/ITextureFormat.h | |
void GetSupportedFormats
(
TArray< FName >& OutFormats |
Gets the list of supported formats. | Interfaces/ITextureFormat.h | |
uint16 GetVersion
(
FName Format, |
Gets the current version of the specified texture format. | Interfaces/ITextureFormat.h | |
virtual bool PrepareTiling
(
const FImage* Images, |
Prepares to compresses a single image with tiling. | Interfaces/ITextureFormat.h | |
virtual void ReleaseTiling
(
const FTextureBuildSettings& BuildSettings, |
Cleans up the FTilerSettings object once it is finished. | Interfaces/ITextureFormat.h | |
virtual bool SetTiling
(
const FTextureBuildSettings& BuildSettings, |
Sets the tiling settings after device-specific tiling has been performed. | Interfaces/ITextureFormat.h | |
virtual bool SupportsEncodeSpeed
(
FName Format, |
Exposes whether the format supports the fast/final encode speed switching in project settings. | Interfaces/ITextureFormat.h | |
virtual bool SupportsTiling() |
Whether device-specific tiling is supported by the compressor. | Interfaces/ITextureFormat.h | |
virtual bool UsesTaskGraph() |
Interfaces/ITextureFormat.h |