FTexture2DArrayResource

Represents a 2D Texture Array to the renderer.

Windows
MacOS
Linux

Inheritance Hierarchy

FRenderResource

FTexture

FTextureResource

FTexture2DArrayResource

Syntax

class FTexture2DArrayResource : public FTextureResource

Remarks

Represents a 2D Texture Array to the renderer.

Constructors

Name Description

Public function

FTexture2DArrayResource()

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

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.

References

Module

Engine

Header

Runtime/Engine/Public/TextureResource.h

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