FTexture2DArrayResource

Represents a 2D Texture Array to the renderer.

Windows
MacOS
Linux

Inheritance Hierarchy

FRenderResource

FTexture

FTextureResource

FTexture2DArrayResource

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/TextureResource.h

Include

#include "TextureResource.h"

Syntax

class FTexture2DArrayResource : public FTextureResource

Remarks

Represents a 2D Texture Array to the renderer.

Constructors

Functions

Name Description

Public function

void

 

AddTexture2D

(
    UTexture2D* NewTexture,
    const FIncomingTextureArrayDataEntr...
)

Adds a texture to the texture array.

Public function

void

 

BeginPreventReallocation()

Prevents reallocation from removals of the texture array until EndPreventReallocation is called.

Public function

void

 

EndPreventReallocation()

Restores the ability to reallocate the texture array.

Public function Const

uint32

 

GetNumSlices()

Returns the number of slices(textures) in this array.

Public function Const

int32

 

GetNumValidTextures()

Public function Const

int32

 

GetTextureIndex

(
    const UTexture2D* Texture
)

Returns the index of a given texture in the texture array.

Public function

void

 

RemoveTexture2D

(
    const UTexture2D* NewTexture
)

Removes a texture from the texture array, and potentially removes the CachedData entry if the last ref was removed.

Public function

void

 

UpdateResource()

Initializes the texture array resource if needed, and re-initializes if the texture array has been made dirty since the last init.

Public function

void

 

UpdateTexture2D

(
    UTexture2D* NewTexture,
    const FIncomingTextureArrayDataEntr...
)

Updates a CachedData entry (if one exists for this texture), with a new texture.

Overridden from FTexture

Name Description

Public function Virtual Const

uint32

 

GetSizeX()

Returns the width of the texture in pixels.

Public function Virtual Const

uint32

 

GetSizeY()

Returns the height of the texture in pixels.

Overridden from FRenderResource

Name Description

Public function Virtual

void

 

InitRHI()

Called when the resource is initialized. This is only called by the rendering thread.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss