Navigation
API > API/Developer > API/Developer/TextureFormat
Inheritance Hierarchy
- ITextureFormat
- FChildTextureFormat
References
| Module | TextureFormat |
| Header | /Engine/Source/Developer/TextureFormat/Public/ChildTextureFormat.h |
| Include | #include "ChildTextureFormat.h" |
Syntax
class FChildTextureFormat : public ITextureFormat
Remarks
Version of ITextureFormat that handles a child texture format that is used as a "post-process" after compressing textures, useful for several platforms that need to modify already compressed texture data for optimal data.
There are 3 ways a texture can get processed: ITextureFormat::IsTiling returns true. This should only be for the old Oodle RAD Game Tools supplied texture encoder and is being deprecated in favor of the new built-in Oodle texture encoder (TextureFormatOodle). In this case, the child format passes the images to the encoder to split apart prior to passing to the platform tools. FChildTextureFormat::GetTiler returns nullptr. This is being phased out because the linear version of the input texture gets encoded for each platform with a post process, wasting cook time. In this case the child format encodes the "base" texture and then tiles it using the platform tools. FChildTextureFormat::GetTiler returns a valid pointer. This is the most recent design. In this case, the child format is used as a holder of metadata and doesn't actually do any work (CompressImage class of functions not called).
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< FName > | BaseFormats | List of base formats that. Combined with FormatPrefix, this contains all formats this can handle. | |
| const FString | FormatPrefix | Prefix put before all formats from parent formats. | |
| TArray< FName > | SupportedFormatsCached | List of combined BaseFormats with FormatPrefix. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FChildTextureFormat
(
const TCHAR* PlatformFormatPrefix |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddBaseTextureFormatModules
(
const TCHAR* ModuleNameWildcard |
||
| bool | CompressBaseImage
(
const FImage& InImage, |
||
| bool | CompressBaseImageTiled
(
const FImage* Images, |
||
| FCbObject | ExportGlobalChildFormatConfig
(
const FTextureBuildSettings& BuildSettings |
Obtains the global format config object for this texture format. | |
| void | |||
| FCbObjectView | GetBaseFormatConfigOverride
(
const FCbObjectView& ObjView |
||
| FName | GetBaseFormatName
(
FName ChildFormatName |
||
| const ITextureFormat * | GetBaseFormatObject
(
FName FormatName |
Given a platform specific format name, get the texture format object that will do the encoding. | |
| FTextureBuildSettings | GetBaseTextureBuildSettings
(
const FTextureBuildSettings& BuildSettings |
||
| FString | GetChildDerivedDataKeyString
(
const FTextureBuildSettings& InBuildSettings, |
Make the child type think about if they need a key string or not, by making it pure virtual. | |
| FCbObjectView | GetChildFormatConfigOverride
(
const FCbObjectView& ObjView |
Obtains the format config appropriate for the build . | |
| uint8 | GetChildFormatVersion
(
FName Format, |
The final version is a combination of parent and child formats, 8 bits for each | |
| const ITextureTiler * | GetTiler () |
Return the texture tiler for this platform. |
Overridden from ITextureFormat
| Type | Name | Description | |
|---|---|---|---|
| bool | CanAcceptNonF32Source
(
FName Format |
||
| FCbObject | ExportGlobalFormatConfig
(
const FTextureBuildSettings& BuildSettings |
Obtains the current global format config object for this texture format. | |
| const FChildTextureFormat * | |||
| 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 | |
| EPixelFormat | GetEncodedPixelFormat
(
const FTextureBuildSettings& InBuildSettings, |
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. | |
| void | GetSupportedFormats
(
TArray< FName >& OutFormats |
Gets the list of supported formats. | |
| uint16 | GetVersion
(
FName Format, |
Gets the current version of the specified texture format. | |
| bool | PrepareTiling
(
const FImage* Images, |
Prepares to compresses a single image with tiling. | |
| void | ReleaseTiling
(
const FTextureBuildSettings& BuildSettings, |
Cleans up the FTilerSettings object once it is finished. | |
| bool | SetTiling
(
const FTextureBuildSettings& BuildSettings, |
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. |