UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FVirtualTexture2DResource Class Reference

#include <TextureResource.h>

+ Inheritance diagram for FVirtualTexture2DResource:

Public Member Functions

ENGINE_API FVirtualTexture2DResource ()
 
ENGINE_API FVirtualTexture2DResource (const UTexture2D *InOwner, struct FVirtualTextureBuiltData *InVTData, int32 FirstMipToUse)
 
virtual ENGINE_API ~FVirtualTexture2DResource ()
 
virtual ENGINE_API void InitRHI (FRHICommandListBase &RHICmdList) override
 
virtual ENGINE_API void ReleaseRHI () override
 
virtual FVirtualTexture2DResourceGetVirtualTexture2DResource ()
 
virtual const FVirtualTexture2DResourceGetVirtualTexture2DResource () const
 
virtual ENGINE_API uint32 GetSizeX () const override
 
virtual ENGINE_API uint32 GetSizeY () const override
 
const FVirtualTextureProducerHandleGetProducerHandle () const
 
class IAllocatedVirtualTextureGetAllocatedVT () const
 
ENGINE_API class IAllocatedVirtualTextureAcquireAllocatedVT ()
 
ENGINE_API void ReleaseAllocatedVT ()
 
virtual ENGINE_API EPixelFormat GetFormat (uint32 LayerIndex) const
 
virtual ENGINE_API FIntPoint GetSizeInBlocks () const
 
virtual ENGINE_API uint32 GetNumTilesX () const
 
virtual ENGINE_API uint32 GetNumTilesY () const
 
virtual ENGINE_API uint32 GetNumMips () const
 
virtual ENGINE_API uint32 GetNumLayers () const
 
virtual ENGINE_API uint32 GetTileSize () const
 
virtual ENGINE_API uint32 GetBorderSize () const
 
uint32 GetAllocatedvAddress () const
 
virtual ENGINE_API FIntPoint GetPhysicalTextureSize (uint32 LayerIndex) const
 
- Public Member Functions inherited from FTextureResource
 FTextureResource ()
 
virtual ~FTextureResource ()
 
virtual bool IsProxy () const
 
virtual FTexture2DResourceGetTexture2DResource ()
 
virtual FTexture3DResourceGetTexture3DResource ()
 
virtual FTexture2DArrayResourceGetTexture2DArrayResource ()
 
virtual FStreamableTextureResourceGetStreamableTextureResource ()
 
virtual const FTexture2DResourceGetTexture2DResource () const
 
virtual const FTexture3DResourceGetTexture3DResource () const
 
virtual const FTexture2DArrayResourceGetTexture2DArrayResource () const
 
virtual const FStreamableTextureResourceGetStreamableTextureResource () const
 
int32 GetCurrentMipCount () const
 
bool IsTextureRHIPartiallyResident () const
 
FRHITextureGetTexture2DRHI () const
 
FRHITextureGetTexture3DRHI () const
 
FRHITextureGetTexture2DArrayRHI () const
 
void SetTextureReference (FRHITextureReference *TextureReference)
 
FRHITextureReferenceGetTextureReference () const
 
- Public Member Functions inherited from FTexture
RENDERCORE_API FTexture ()
 
virtual RENDERCORE_API ~FTexture ()
 
RENDERCORE_API FTexture (const FTexture &)
 
RENDERCORE_API FTexture (FTexture &&)
 
RENDERCORE_API FTextureoperator= (const FTexture &Other)
 
RENDERCORE_API FTextureoperator= (FTexture &&Other)
 
const FTextureRHIRefGetTextureRHI ()
 
virtual RENDERCORE_API uint32 GetSizeZ () const
 
virtual RENDERCORE_API FString GetFriendlyName () const override
 
- Public Member Functions inherited from FRenderResource
RENDERCORE_API FRenderResource ()
 
RENDERCORE_API FRenderResource (ERHIFeatureLevel::Type InFeatureLevel)
 
RENDERCORE_API FRenderResource (const FRenderResource &)
 
RENDERCORE_API FRenderResource (FRenderResource &&)
 
RENDERCORE_API FRenderResourceoperator= (const FRenderResource &Other)
 
RENDERCORE_API FRenderResourceoperator= (FRenderResource &&Other)
 
virtual RENDERCORE_API ~FRenderResource ()
 
virtual RENDERCORE_API void InitResource (FRHICommandListBase &RHICmdList)
 
virtual RENDERCORE_API void ReleaseResource ()
 
RENDERCORE_API void UpdateRHI (FRHICommandListBase &RHICmdList)
 
bool IsInitialized () const
 
int32 GetListIndex () const
 
EInitPhase GetInitPhase () const
 
void SetOwnerName (FName InOwnerName)
 
FName GetOwnerName () const
 
void SetResourceName (FName InResourceName)
 
FName GetResourceName () const
 

Protected Attributes

FName TextureName
 
FName PackageName
 
uint32 FullNameHash = 0
 
TEnumAsByte< ESamplerFilterFilter = SF_Point
 
TEnumAsByte< ESamplerAddressModeAddressU = AM_Wrap
 
TEnumAsByte< ESamplerAddressModeAddressV = AM_Wrap
 
ETextureCreateFlags TexCreateFlags = ETextureCreateFlags::None
 
bool bSinglePhysicalSpace = false
 
bool bRequiresSinglePhysicalPool = false
 
EVTProducerPriority VirtualTextureStreamingPriority
 
int32 FirstMipToUse = 0
 
struct FVirtualTextureBuiltDataVTData = nullptr
 
class IAllocatedVirtualTextureAllocatedVT = nullptr
 
FVirtualTextureProducerHandle ProducerHandle
 
- Protected Attributes inherited from FTextureResource
FTextureReferenceRHIRef TextureReferenceRHI
 

Additional Inherited Members

- Public Types inherited from FRenderResource
enum class  EInitPhase : uint8 { Pre , Default , MAX }
 
- Static Public Member Functions inherited from FRenderResource
static RENDERCORE_API void ReleaseRHIForAllResources ()
 
static RENDERCORE_API void InitPreRHIResources ()
 
static RENDERCORE_API void ChangeFeatureLevel (ERHIFeatureLevel::Type NewFeatureLevel)
 
static RENDERCORE_API FName SetScopeName (FName Name)
 
- Public Attributes inherited from FTexture
FTextureRHIRef TextureRHI
 
FSamplerStateRHIRef SamplerStateRHI
 
FSamplerStateRHIRef DeferredPassSamplerStateRHI
 
double LastRenderTime = -FLT_MAX
 
FMipBiasFade MipBiasFade
 
bool bGreyScaleFormat = false
 
bool bIgnoreGammaConversions = false
 
bool bSRGB = false
 
- Public Attributes inherited from FRenderResource
ERenderResourceState ResourceState = ERenderResourceState::Default
 
- Protected Member Functions inherited from FRenderResource
void SetFeatureLevel (const FStaticFeatureLevel InFeatureLevel)
 
const FStaticFeatureLevel GetFeatureLevel () const
 
bool HasValidFeatureLevel () const
 
template<typename T >
FBufferRHIRef CreateRHIBuffer (FRHICommandListBase &RHICmdList, T &InOutResourceObject, uint32 ResourceCount, EBufferUsageFlags InBufferUsageFlags, const TCHAR *InDebugName)
 
void SetInitPhase (EInitPhase InInitPhase)
 
- Static Protected Member Functions inherited from FTexture
static RENDERCORE_API FRHISamplerStateGetOrCreateSamplerState (const FSamplerStateInitializerRHI &Initializer)
 
- Static Protected Member Functions inherited from FRenderResource
static RENDERCORE_API FRHICommandListBaseGetImmediateCommandList ()
 

Constructor & Destructor Documentation

◆ FVirtualTexture2DResource() [1/2]

FVirtualTexture2DResource::FVirtualTexture2DResource ( )

◆ FVirtualTexture2DResource() [2/2]

FVirtualTexture2DResource::FVirtualTexture2DResource ( const UTexture2D InOwner,
struct FVirtualTextureBuiltData InVTData,
int32  FirstMipToUse 
)

◆ ~FVirtualTexture2DResource()

FVirtualTexture2DResource::~FVirtualTexture2DResource ( )
virtual

Member Function Documentation

◆ AcquireAllocatedVT()

class IAllocatedVirtualTexture * FVirtualTexture2DResource::AcquireAllocatedVT ( )

◆ GetAllocatedvAddress()

uint32 FVirtualTexture2DResource::GetAllocatedvAddress ( ) const

◆ GetAllocatedVT()

class IAllocatedVirtualTexture * FVirtualTexture2DResource::GetAllocatedVT ( ) const
inline

FVirtualTexture2DResource may have an AllocatedVT, which represents a page table allocation for the virtual texture. VTs used by materials generally don't need their own allocation, since the material has its own page table allocation for each VT stack. VTs used as lightmaps need their own allocation. Also VTs open in texture editor will have a temporary allocation. GetAllocatedVT() will return the current allocation if one exists. AcquireAllocatedVT() will make a new allocation if needed, and return it. ReleaseAllocatedVT() will free any current allocation.

◆ GetBorderSize()

uint32 FVirtualTexture2DResource::GetBorderSize ( ) const
virtual

◆ GetFormat()

EPixelFormat FVirtualTexture2DResource::GetFormat ( uint32  LayerIndex) const
virtual

◆ GetNumLayers()

uint32 FVirtualTexture2DResource::GetNumLayers ( ) const
virtual

◆ GetNumMips()

uint32 FVirtualTexture2DResource::GetNumMips ( ) const
virtual

◆ GetNumTilesX()

uint32 FVirtualTexture2DResource::GetNumTilesX ( ) const
virtual

◆ GetNumTilesY()

uint32 FVirtualTexture2DResource::GetNumTilesY ( ) const
virtual

◆ GetPhysicalTextureSize()

FIntPoint FVirtualTexture2DResource::GetPhysicalTextureSize ( uint32  LayerIndex) const
virtual

◆ GetProducerHandle()

const FVirtualTextureProducerHandle & FVirtualTexture2DResource::GetProducerHandle ( ) const
inline

◆ GetSizeInBlocks()

FIntPoint FVirtualTexture2DResource::GetSizeInBlocks ( ) const
virtual

◆ GetSizeX()

uint32 FVirtualTexture2DResource::GetSizeX ( ) const
overridevirtual

Returns the width of the texture in pixels.

Reimplemented from FTexture.

◆ GetSizeY()

uint32 FVirtualTexture2DResource::GetSizeY ( ) const
overridevirtual

Returns the height of the texture in pixels.

Reimplemented from FTexture.

◆ GetTileSize()

uint32 FVirtualTexture2DResource::GetTileSize ( ) const
virtual

◆ GetVirtualTexture2DResource() [1/2]

virtual FVirtualTexture2DResource * FVirtualTexture2DResource::GetVirtualTexture2DResource ( )
inlinevirtual

Reimplemented from FTextureResource.

◆ GetVirtualTexture2DResource() [2/2]

virtual const FVirtualTexture2DResource * FVirtualTexture2DResource::GetVirtualTexture2DResource ( ) const
inlinevirtual

Reimplemented from FTextureResource.

◆ InitRHI()

void FVirtualTexture2DResource::InitRHI ( FRHICommandListBase RHICmdList)
overridevirtual

Initializes the RHI resources used by this resource. Called when entering the state where both the resource and the RHI have been initialized. This is only called by the rendering thread.

Reimplemented from FRenderResource.

Reimplemented in FMaterialCacheVirtualTextureResource, and FVirtualTextureAdapterRenderResource.

◆ ReleaseAllocatedVT()

void FVirtualTexture2DResource::ReleaseAllocatedVT ( )

◆ ReleaseRHI()

void FVirtualTexture2DResource::ReleaseRHI ( )
overridevirtual

Releases the RHI resources used by this resource. Called when leaving the state where both the resource and the RHI have been initialized. This is only called by the rendering thread.

Reimplemented from FTexture.

Member Data Documentation

◆ AddressU

TEnumAsByte<ESamplerAddressMode> FVirtualTexture2DResource::AddressU = AM_Wrap
protected

◆ AddressV

TEnumAsByte<ESamplerAddressMode> FVirtualTexture2DResource::AddressV = AM_Wrap
protected

◆ AllocatedVT

class IAllocatedVirtualTexture* FVirtualTexture2DResource::AllocatedVT = nullptr
protected

Local allocated VT objects used for editor views etc.

◆ bRequiresSinglePhysicalPool

bool FVirtualTexture2DResource::bRequiresSinglePhysicalPool = false
protected

◆ bSinglePhysicalSpace

bool FVirtualTexture2DResource::bSinglePhysicalSpace = false
protected

Cached owner settings

◆ Filter

TEnumAsByte<ESamplerFilter> FVirtualTexture2DResource::Filter = SF_Point
protected

Cached sampler config

◆ FirstMipToUse

int32 FVirtualTexture2DResource::FirstMipToUse = 0
protected

Mip offset

◆ FullNameHash

uint32 FVirtualTexture2DResource::FullNameHash = 0
protected

A hash of the texture asset name

◆ PackageName

FName FVirtualTexture2DResource::PackageName
protected

The FName of the texture package for stats

◆ ProducerHandle

FVirtualTextureProducerHandle FVirtualTexture2DResource::ProducerHandle
protected

◆ TexCreateFlags

ETextureCreateFlags FVirtualTexture2DResource::TexCreateFlags = ETextureCreateFlags::None
protected

Cached flags for texture creation.

◆ TextureName

FName FVirtualTexture2DResource::TextureName
protected

The FName of the texture asset

◆ VirtualTextureStreamingPriority

EVTProducerPriority FVirtualTexture2DResource::VirtualTextureStreamingPriority
protected

◆ VTData

struct FVirtualTextureBuiltData* FVirtualTexture2DResource::VTData = nullptr
protected

Built data owned by texture asset


The documentation for this class was generated from the following files: