Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Engine
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UStreamableRenderAsset
- UTexture
- UTexture2D
- UCurveLinearColorAtlas
- ULightMapTexture2D
- ULightMapVirtualTexture2D
- UMeshPaintVirtualTexture
- URuntimeVirtualTextureStreamingProxy
- UShadowMapTexture2D
- UTextureLightProfile
- UVirtualTexture2D
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Engine/Texture2D.h |
Include | #include "Engine/Texture2D.h" |
Syntax
UCLASS (HideCategories=Object, MinimalAPI, BlueprintType)
class UTexture2D : public UTexture
Variables
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() ![]() ![]() |
TEnumAsByte< enum TextureAddress > | AddressX | The addressing mode to use for the X axis. |
![]() ![]() ![]() ![]() ![]() |
TEnumAsByte< enum TextureAddress > | AddressY | The addressing mode to use for the Y axis. |
![]() ![]() |
uint8: 1 | bHasBeenPaintedInEditor | Whether the texture has been painted in the editor. |
![]() |
TMap< FString, FTexturePlatformData * > | CookedPlatformData | Cooked platform data for this texture |
![]() ![]() |
TObjectPtr< UTexture2D > | CPUCopyTexture | If we ever show the CPU accessible image in the editor we'll need a transient texture with those bits in it. |
![]() ![]() |
int32 | FirstResourceMemMip | Keep track of first mip level used for ResourceMem creation |
![]() |
FTexture2DResourceMem * | ResourceMem | Memory used for directly loading bulk mip data |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UTexture2D
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() ![]() |
FSharedImageConstRefBlueprint | ||
![]() ![]() ![]() ![]() |
int32 | Gets the X size of the texture, in pixels | |
![]() ![]() ![]() ![]() |
int32 | Gets the Y size of the texture, in pixels | |
![]() ![]() |
int32 | CalcTextureMemorySize
(
int32 MipCount |
Calculates the size of this texture in bytes if it had MipCount miplevels streamed in. |
![]() ![]() |
UTexture2D * | CreateTransient
(
int32 InSizeX, |
Creates and initializes a new Texture2D with the requested settings. |
![]() ![]() |
UTexture2D * | CreateTransientFromImage
(
const FImage* InImage, |
Creates a new texture2d from the first slice of the given image. |
![]() ![]() |
UTextureAllMipDataProviderFactory * | ||
![]() ![]() |
FSharedImageConstRef | GetCPUCopy () |
If the texture has a cpu accessible copy, this returns that copy. |
![]() |
UTexture2D * | Creates and returns a 2d texture that holds the CPU copy. | |
![]() ![]() |
int32 | GetExtData () |
|
![]() ![]() |
float | Returns the global mip map bias applied as an offset for 2d textures. | |
![]() ![]() |
FIntPoint | Retrieves the size of the source image from which the texture was created. | |
![]() ![]() |
bool | GetInitialMipData
(
int32 InFirstMipToLoad, |
Retrieve initial texel data for mips, starting from FirstMipToLoad, up to the last mip in the texture. |
![]() ![]() |
int32 | Returns the minimum number of mips that must be resident in memory (cannot be streamed). | |
![]() |
void | GetMipData
(
int32 FirstMipToLoad, |
Get the PlatformData mip data starting with the specified mip index. |
![]() ![]() |
int32 | ||
![]() ![]() |
int32 | GetNumMips () |
|
![]() ![]() |
int32 | GetNumMipsAllowed
(
bool bIgnoreMinResidency |
Calculates the maximum number of mips that will be in this texture after cooking (eg. after the "drop mip" lod bias is applied). |
![]() ![]() |
int32 | ||
![]() ![]() |
EPixelFormat | GetPixelFormat
(
uint32 LayerIndex |
|
![]() ![]() |
const FTexturePlatformData * | Get the const derived data for this texture on this platform. | |
![]() |
FTexturePlatformData * | Get the derived data for this texture on this platform. | |
![]() ![]() |
const TIndirectArray< FTexture2DMipMap > & | ||
![]() |
bool | Calculates and returns the corresponding ResourceMem parameters for this texture. | |
![]() ![]() |
int32 | GetSizeX () |
Trivial accessors. |
![]() ![]() |
int32 | GetSizeY () |
|
![]() |
bool | GetSourceArtCRC
(
uint32& OutSourceCRC |
Get the CRC of the source art pixels. |
![]() ![]() |
bool | Returns true if the runtime texture has an alpha channel that is not completely white. | |
![]() |
bool | HasSameSourceArt
(
UTexture2D* InTexture |
See if the source art of the two textures matches... |
![]() ![]() ![]() |
bool | Returns true if this virtual texture requests round-robin updates of the virtual texture pages. | |
![]() ![]() ![]() |
bool | Returns true if this virtual texture uses a single physical space all of its texture layers. | |
![]() ![]() |
void | Update the offset for mip map lod bias. This is added to any existing mip bias values. | |
![]() |
void | SetPlatformData
(
FTexturePlatformData* PlatformData |
Set the derived data for this texture on this platform. |
![]() |
void | Temporarily disable streaming so we update subregions of this texture without streaming clobbering it. | |
![]() |
void | UpdateTextureRegions
(
int32 MipIndex, |
Asynchronously update a set of regions of a texture with new data. |
Overridden from UTexture
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
bool | Returns true if the Downscale and DownscaleOptions properties should be editable in the UI. | |
![]() ![]() ![]() |
uint32 | Calculates the size of this texture if it had MipCount miplevels streamed in. | |
![]() ![]() |
FTextureResource * | Implemented by subclasses to create a new resource for the texture. | |
![]() ![]() |
float | GetAverageBrightness
(
bool bIgnoreTrueBlack, |
Gets the average brightness of the texture (in linear space) |
![]() ![]() |
TMap< FString, FTexturePlatformData * > * | ||
![]() ![]() ![]() |
EMaterialValueType | ||
![]() ![]() |
FTexturePlatformData ** | Textures that use the derived data cache must override this function and provide a pointer to the linked list of platform data. | |
![]() ![]() ![]() |
uint32 | ||
![]() ![]() ![]() |
float | ||
![]() ![]() ![]() |
float | ||
![]() ![]() ![]() |
float | ||
![]() ![]() ![]() |
TextureAddress | ||
![]() ![]() ![]() |
TextureAddress | ||
![]() ![]() ![]() |
ETextureClass | Get Texture Class | |
![]() ![]() ![]() |
bool | Returns if the texture is actually being rendered using virtual texturing right now. | |
![]() ![]() ![]() |
bool | Returns true if the current texture is a default placeholder because compilation is still ongoing. | |
![]() ![]() |
void | Creates a new resource for the texture, and updates any cached references to the resource. |
Overridden from UStreamableRenderAsset
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
int32 | CalcCumulativeLODSize
(
int32 NumLODs |
|
![]() ![]() |
bool | Loads mips from disk to memory. Only usable if the asset is streamable. | |
![]() ![]() |
bool | Unload some mips from memory. Only usable if the asset is streamable. |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | BeginDestroy () |
Called before destroying the object. |
![]() ![]() ![]() |
void | GetAssetRegistryTags
(
TArray< FAssetRegistryTag >& OutTags |
|
![]() ![]() ![]() |
void | GetAssetRegistryTags
(
FAssetRegistryTagsContext Context |
Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects |
![]() ![]() |
FString | GetDesc () |
Return a one line description of an object for viewing in the thumbnail view of the generic browser |
![]() ![]() |
void | GetResourceSizeEx
(
FResourceSizeEx& CumulativeResourceSize |
Returns the size of the object/ resource for display to artists/ LDs in the Editor. |
![]() ![]() ![]() |
bool | Called before calling PostLoad() in FAsyncPackage::PostLoadObjects(). | |
![]() ![]() |
void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally |
![]() ![]() |
void | PostEditUndo () |
Called after an editor or undo operation is formed on texture |
![]() ![]() |
void | Called in response to the linker changing, this can only happen in the editor | |
![]() ![]() |
void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. |
![]() ![]() |
PRAGMA_DISABLE_DEPRECATION_WARNINGS void | PreSave
(
const ITargetPlatform* TargetPlatform |
|
![]() ![]() |
PRAGMA_ENABLE_DEPRECATION_WARNINGS void | PreSave
(
FObjectPreSaveContext ObjectSaveContext |
Presave function. |
![]() ![]() |
void | Handles reading, writing, and reference collecting using FArchive. |