FTextureSource

Texture source data management.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/Texture.h

Include

#include "Engine/Texture.h"

Syntax

struct FTextureSource

Remarks

Texture source data management.

Constructors

Name Description

Public function

FTextureSource()

Default constructor.

Functions

Name Description

Public function Const

int32

 

CalcMipSize

(
    int32 MipIndex
)

Public function Const

int32

 

CalcMipSize

(
    int32 BlockIndex,
    int32 LayerIndex,
    int32 MipIndex
)

Computes the size of a single mip.

Public function

void

 

Compress()

PNG Compresses the source art if possible or tells the bulk data to zlib compress when it saves out to disk.

Public function

void

 

ForceGenerateGuid()

Force the GUID to change even if mip data has not been modified.

Public function Const

void

 

GetBlock

(
    int32 Index,
    FTextureSourceBlock& OutBlock
)

Access the given block

Public function Const

int32

 

GetBytesPerPixel

(
    int32 LayerIndex
)

Computes the number of bytes per-pixel.

Public function Static

int32

 

GetBytesPerPixel

(
    ETextureSourceFormat Format
)

Public function Const

ETextureSour...

 

GetFormat

(
    int32 LayerIndex
)

Public function Const

FGuid

 

GetId()

Trivial accessors.

Public function Const

FString

 

GetIdString()

Returns the unique ID string for this source art.

Public function Const

FIntPoint

 

GetLogicalSize()

Logical size of the texture includes all blocks

Public function

bool

 

GetMipData

(
    TArray64< uint8 >& OutMipData,
    int32 MipIndex,
    IImageWrapperModule* ImageWrap...
)

Legacy API that defaults to LayerIndex 0

Public function

bool

 

GetMipData

(
    TArray64< uint8 >& OutMipData,
    int32 BlockIndex,
    int32 LayerIndex,
    int32 MipIndex,
    IImageWrapperModule* ImageWrap...
)

Retrieve a copy of the data for a particular mip.

Public function Const

int32

 

GetNumBlocks()

Public function Const

int32

 

GetNumLayers()

Public function Const

int32

 

GetNumMips()

Public function Const

int32

 

GetNumSlices()

Public function Const

FIntPoint

 

GetSizeInBlocks()

Size of texture in blocks

Public function Const

int32

 

GetSizeOnDisk()

Public function Const

int32

 

GetSizeX()

Public function Const

int32

 

GetSizeY()

Public function Const

bool

 

HasHadBulkDataCleared()

Public function

void

 

Init

(
    int32 NewSizeX,
    int32 NewSizeY,
    int32 NewNumSlices,
    int32 NewNumMips,
    ETextureSourceFormat NewFormat,
    const uint8* NewData
)

Initialize the source data with the given size, number of mips, and format.

Public function

void

 

Init2DWithMipChain

(
    int32 NewSizeX,
    int32 NewSizeY,
    ETextureSourceFormat NewFormat
)

Initializes the source data for a 2D texture with a full mip chain.

Public function

void

 

InitBlocked

(
    const ETextureSourceFormat* In...,
    const FTextureSourceBlock* InB...,
    int32 InNumLayers,
    int32 InNumBlocks,
    const uint8** InDataPerBlo...
)

Public function

void

 

InitCubeWithMipChain

(
    int32 NewSizeX,
    int32 NewSizeY,
    ETextureSourceFormat NewFormat
)

Initializes the source data for a cubemap with a full mip chain.

Public function

void

 

InitLayered

(
    int32 NewSizeX,
    int32 NewSizeY,
    int32 NewNumSlices,
    int32 NewNumLayers,
    int32 NewNumMips,
    const ETextureSourceFormat* Ne...,
    const uint8* NewData
)

Public function

void

 

InitLayered2DWithMipChain

(
    int32 NewSizeX,
    int32 NewSizeY,
    int32 NewNumLayers,
    const ETextureSourceFormat* Ne...
)

Public function Const

bool

 

IsBulkDataLoaded()

Public function Static

bool

 

IsHDR

(
    ETextureSourceFormat Format
)

Public function Const

bool

 

IsPNGCompressed()

Public function Const

bool

 

IsPowerOfTwo

(
    int32 BlockIndex
)

Return true if the source data is power-of-2.

Public function Const

bool

 

IsValid()

Returns true if source art is available.

Public function

bool

 

LoadBulkDataWithFileReader()

Public function

uint8 *

 

LockMip

(
    int32 MipIndex
)

Public function

uint8 *

 

LockMip

(
    int32 BlockIndex,
    int32 LayerIndex,
    int32 MipIndex
)

Lock a mip for editing.

Public function

void

 

ReleaseSourceMemory()

Public function

void

 

RemoveBulkData()

Public function

void

 

SetId

(
    const FGuid& InId,
    bool bInGuidIsHash
)

Sets the GUID to use, and whether that GUID is actually a hash of some data.

Public function

void

 

UnlockMip

(
    int32 MipIndex
)

Public function

void

 

UnlockMip

(
    int32 BlockIndex,
    int32 LayerIndex,
    int32 MipIndex
)

Unlock a mip.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback