Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Engine
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Engine/Texture.h |
Include | #include "Engine/Texture.h" |
Syntax
USTRUCT ()
struct FTextureSource
Remarks
Texture source data management.
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
Default constructor. |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
bool | ||
![]() ![]() |
int64 | CalcMipOffset
(
int32 BlockIndex, |
Retrieve the size and offset for a source mip. The size includes all slices. |
![]() ![]() |
int64 | CalcMipSize
(
int32 BlockIndex, |
Computes the size of a single mip in bytes. |
![]() ![]() |
int64 | CalcMipSize
(
int32 MipIndex |
|
![]() |
void | Compress () |
PNG Compresses the source art if possible or tells the bulk data to zlib compress when it saves out to disk. |
![]() ![]() |
bool | ComputeChannelLinearMinMax
(
int32 InLayerIndex, |
|
![]() ![]() |
FTextureSource | CopyTornOff () |
Make a copy with a torn-off BulkData that has the same Guid used for DDC as this->BulkData |
![]() |
void | ExportCustomProperties
(
FOutputDevice& Out, |
Support for copy/paste |
![]() |
void | Force the GUID to change even if mip data has not been modified. | |
![]() ![]() |
void | GetBlock
(
int32 Index, |
Access the given block |
![]() |
FSharedBuffer | GetBulkDataPayload returns the raw bulkdata memory in compressed form, not decompressed (use LockMip or GetMipData for that) the shared buffer should be treated as read only! to modify, make a copy and call Init() on the source with the changed copy | |
![]() ![]() |
int64 | GetBytesPerPixel
(
int32 LayerIndex |
Computes the number of bytes per-pixel. |
![]() ![]() |
int64 | GetBytesPerPixel
(
ETextureSourceFormat Format |
Should match ERawImageFormat::GetBytesPerPixel |
![]() ![]() |
ETextureSourceFormat | ||
![]() ![]() |
EGammaSpace | GetGammaSpace
(
int LayerIndex |
Get GammaSpace for this Source (asks owner) |
![]() ![]() |
FGuid | GetId () |
GetId() returns a hash of the Id member (data hash) and also the attributes of the Source. |
![]() ![]() |
FString | GetIdString () |
Returns the unique ID string for this source art. |
![]() ![]() |
void | GetLayerColorInfo
(
TArray< FTextureSourceLayerColorInfo >& OutLayerColorInfo |
|
![]() ![]() |
FIntPoint | Logical size of the texture includes all blocks | |
![]() |
bool | GetMipData
(
TArray64< uint8 >& OutMipData, |
Retrieve a copy of the data for a particular mip. Prefer GetMipImage. |
![]() |
bool | GetMipData
(
TArray64< uint8 >& OutMipData, |
Legacy API that defaults to LayerIndex 0. Prefer GetMipImage. |
![]() |
FMipData | GetMipData
(
IImageWrapperModule* ImageWrapperModule |
Returns a FMipData structure that wraps around the entire mip chain for read only operations. |
![]() |
bool | GetMipImage
(
FImage& OutImage, |
Retrieve a copy of the MipData as an FImage. |
![]() |
bool | GetMipImage
(
FImage& OutImage, |
Retrieve a copy of the MipData as an FImage |
![]() ![]() |
bool | GetMipImageInfo
(
FImageInfo& OutImageInfo, |
Get ImageInfo of one mip. |
![]() ![]() |
int | GetMippedNumSlices
(
int NumSlices, |
Get mipped number of slices (volumes mip but arrays don't) |
![]() ![]() |
int32 | GetNumBlocks () |
|
![]() ![]() |
int32 | GetNumLayers () |
|
![]() ![]() |
int32 | GetNumMips () |
|
![]() ![]() |
int32 | GetNumSlices () |
|
![]() ![]() |
FGuid | Trivial accessors. | |
![]() ![]() |
FIntPoint | Size of texture in blocks | |
![]() ![]() |
int64 | Note: simple queries on BulkData are not taking the BulkDataLock , nor does BulkData internally mutex protect these | |
![]() ![]() |
int64 | GetSizeX () |
|
![]() ![]() |
int64 | GetSizeY () |
|
![]() ![]() |
ETextureSourceCompressionFormat | Returns the compression format of the source data in enum format. | |
![]() ![]() |
FString | Returns the compression format of the source data in string format for use with the UI. | |
![]() ![]() |
ETextureClass | Get TextureClass for this Source (asks owner) | |
![]() ![]() |
int64 | Total number of pixels in the top mip level over all blocks+layers. | |
![]() ![]() |
int | Returns volume depth, or 1 if not a volume | |
![]() ![]() |
bool | ||
![]() ![]() |
bool | ||
![]() ![]() |
bool | ||
![]() |
void | ImportCustomProperties
(
const TCHAR* SourceText, |
|
![]() |
void | Init
(
const FImageView& Image |
Init and copy in texture bits from Image |
![]() |
void | Init
(
int32 NewSizeX, |
Initialize the source data with the given size, number of mips, and format. |
![]() |
void | Initialize the source data with the given size, number of mips, and format. | |
![]() |
void | Init2DWithMipChain
(
int32 NewSizeX, |
Initializes the source data for a 2D texture with a full mip chain. |
![]() |
void | InitBlocked
(
const ETextureSourceFormat* InLayerFormats, |
|
![]() |
void | InitBlocked
(
const ETextureSourceFormat* InLayerFormats, |
|
![]() |
void | InitCubeWithMipChain
(
int32 NewSizeX, |
Initializes the source data for a cubemap with a full mip chain. |
![]() |
void | InitLayered
(
int32 NewSizeX, |
|
![]() |
void | InitLayered
(
int32 NewSizeX, |
|
![]() |
void | InitLayered2DWithMipChain
(
int32 NewSizeX, |
|
![]() |
void | InitWithCompressedSourceData
(
int32 NewSizeX, |
Initialize the source data with the given size, number of mips, and format. |
![]() |
void | InitWithCompressedSourceData
(
int32 NewSizeX, |
Initialize the source data with the given size, number of mips, and format. |
![]() ![]() |
bool | IsBlockPowerOfTwo
(
int32 BlockIndex |
Return true if the source XY size is power-of-2. Does not check Z size for volumes. |
![]() ![]() |
bool | Returns true if the texture's bulkdata payload is either already in memory or if the payload is 0 bytes in length. | |
![]() ![]() |
bool | Warning: bLongLatCubemap is not correct. | |
![]() ![]() |
bool | IsHDR
(
ETextureSourceFormat Format |
Should match ERawImageFormat::IsHDR |
![]() ![]() |
bool | ||
![]() ![]() |
bool | IsPowerOfTwo
(
int32 BlockIndex |
Return true if the source XY size is power-of-2. Does not check Z size for volumes. |
![]() ![]() |
bool | ||
![]() ![]() |
bool | IsValid () |
Returns true if source art is available. |
![]() ![]() |
bool | IsVolume () |
|
![]() |
bool | ||
![]() |
uint8 * | Lock a mip for editing. Note that Lock/Unlock for edit automatically does UseHashAsGuid. | |
![]() |
uint8 * | Lock a mip for editing. | |
![]() |
const uint8 * | LockMipReadOnly
(
int32 MipIndex |
Lock a mip for reading. |
![]() |
const uint8 * | LockMipReadOnly
(
int32 BlockIndex, |
Use FMipLock to encapsulate a locked mip Lock a mip for reading. |
![]() |
void | OperateOnLoadedBulkData
(
TFunctionRef< void(const FSharedBuffer&BulkDataBuffer)> Operation |
Apply a visitor to the bulkdata : prefer GetBulkDataPayload() instead. |
![]() |
void | ||
![]() |
void | ||
![]() |
void | ||
![]() |
void | Reset () |
Reset the source to empty, frees all memory. |
![]() |
void | ||
![]() |
void | Sets the GUID to use, and whether that GUID is actually a hash of some data. | |
![]() |
void | SetLayerColorInfo
(
const TArray< FTextureSourceLayerColorInfo >& InLayerColorInfo |
|
![]() |
void | ||
![]() |
void | Unlock a mip. | |
![]() |
void | ||
![]() |
bool | UpdateChannelLinearMinMax runs FImageCore::ComputeChannelLinearMinMax on all blocks and layers (but only mip0), returns false if the source was unable to be locked and leaves the channel minmax as unknown. | |
![]() |
bool | UpdateChannelMinMaxFromIncomingTextureData
(
FMemoryView InNewTextureData |
As per UpdateChannelLinearMinMax(), except acts on incoming new data rather than locking existing mips. |
![]() |
void | Uses a hash as the GUID, useful to prevent creating new GUIDs on load for legacy assets. |
Classes
Type | Name | Description | |
---|---|---|---|
![]() |
FMipAllocation | ||
![]() |
FMipData | Structure that encapsulates the decompressed texture data and can be accessed per mip | |
![]() |
FMipLock | FMipLock to encapsulate a locked mip - acquires the lock in construct and unlocks in destruct. |
Enums
Type | Name | Description | |
---|---|---|---|
![]() |
ELockState |