ITextureFormat

Interface for texture compression modules.

Unreal Engine C++ API Reference > Developer > TextureFormat > Interfaces

Inheritance Hierarchy

  • ITextureFormat

References

   
Module TextureFormat
Header /Engine/Source/Developer/TextureFormat/Public/Interfaces/ITextureFormat.h
Include #include "Interfaces/ITextureFormat.h"

Syntax

class ITextureFormat  

Remarks

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.

Destructors

Type Name Description
  ~ITextureFormat () Virtual destructor.

Functions

Type Name Description
bool AllowParallelBuild () Checks whether this texture format can compress in parallel.
bool CanAcceptNonF32Source ( FName Format )  
bool CompressImage ( const FImage& Image, const FTextureBuildSettings& Build..., const FIntVector3& InMip0Dimension..., int32 InMip0NumSlicesNoDepth, int32 InMipIndex, int32 InMipCount, FStringView DebugTexturePathName, bool bImageHasAlphaChannel, FCompressedImage2D& OutCompressedI... ) Compresses a single image.
bool CompressImageEx ( const FImage* Images, const uint32 NumImages, const FTextureBuildSettings& Build..., const FIntVector3& InMip0Dimension..., int32 InMip0NumSlicesNoDepth, int32 InMipIndex, int32 InMipCount, FStringView DebugTexturePathName, bool bImageHasAlphaChannel, uint32 ExtData, FCompressedImage2D& OutCompressedI... ) Compress an image (or images for a miptail) into a single mip blob.
bool CompressImageTiled ( const FImage* Images, uint32 NumImages, const FTextureBuildSettings& Build..., FStringView DebugTexturePathName, bool bImageHasAlphaChannel, TSharedPtr< FTilerSettings >& Tile..., FCompressedImage2D& OutCompressedI... ) Compress an image (or images for a miptail) into a single mip blob with device-specific tiling.
FCbObject ExportGlobalFormatConfig ( const FTextureBuildSettings& Build... ) Obtains the current global format config object for this texture format.
FString GetAlternateTextureFormatPrefix () If this is an Alternate Texture Format, return the prefix to apply
const FChild... GetChildFormat ()  
FString GetDerivedDataKeyString ( const FTextureBuildSettings& InBui..., int32 InMipCount, const FIntVector3& InMip0Dimension... ) 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
EPixelFormat GetEncodedPixelFormat ( const FTextureBuildSettings& InBui..., bool bInImageHasAlphaChannel ) Returns what the compressed pixel format will be for a given format and the given settings.
FName GetEncoderName ( FName Format ) Return the name of the encoder used for the given format.Used for debugging and UI.
FEncodedText... GetExtendedDataForTexture ( const FEncodedTextureDescription& ..., int8 InLODBias ) Generate and return any out-of-band data that needs to be saved for a given encoded texture description.
FName GetLatestSdkVersion () Identify the latest sdk version for this texture encoder (note the SdkVersion is different than the TextureFormat Version)
void GetSupportedFormats ( TArray< FName >& OutFormats ) Gets the list of supported formats.
uint16 GetVersion ( FName Format, const FTextureBuildSettings* B... ) Gets the current version of the specified texture format.
bool PrepareTiling ( const FImage* Images, const uint32 NumImages, const FTextureBuildSettings& Build..., bool bImageHasAlphaChannel, TSharedPtr< FTilerSettings >& OutT..., TArray< FCompressedImage2D >& OutC... ) Prepares to compresses a single image with tiling.
void ReleaseTiling ( const FTextureBuildSettings& Build..., TSharedPtr< FTilerSettings >& Tile... ) Cleans up the FTilerSettings object once it is finished.
bool SetTiling ( const FTextureBuildSettings& Build..., TSharedPtr< FTilerSettings >& Tile..., const TArray64< uint8 >& Reordered..., uint32 NumBlocks ) Sets the tiling settings after device-specific tiling has been performed.
bool SupportsEncodeSpeed ( FName Format ) Exposes whether the format supports the fast/final encode speed switching in project settings.
bool SupportsTiling () Whether device-specific tiling is supported by the compressor.

Classes

Type Name Description
Public struct FTilerSettings An object produced by PrepareTiling and used by SetTiling and CompressImageTiled.

Deprecated Functions

Type Name Description
FTextureForm... GetFormatCapabilities () Hasn't been used in a while.
FTextureForm... GetFormatCapabilitiesEx ( const FTextureBuildSettings& Build..., uint32 NumMips, const FImage& ExampleImage, bool bImageHasAlphaChannel ) Use GetExtendedDataForTexture instead to get the same information without the actual image bits.
EPixelFormat GetPixelFormatForImage ( const FTextureBuildSettings& Build..., const FImage& Image, bool bImageHasAlphaChannel ) Use GetEncodedPixelFormat(BuildSettings, bImageHasAlphaChannel) instead
bool UsesTaskGraph () Legacy API - do not use

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library