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

#include <VirtualTextureAllocator.h>

Public Member Functions

RENDERER_API FVirtualTextureAllocator (uint32 Dimensions)
 
 ~FVirtualTextureAllocator ()
 
RENDERER_API void Initialize (uint32 MaxSize)
 
uint32 GetAllocatedWidth () const
 
uint32 GetAllocatedHeight () const
 
RENDERER_API FAllocatedVirtualTextureFind (uint32 vAddress, uint32 &OutLocal_vAddress) const
 
FAllocatedVirtualTextureFind (uint32 vAddress) const
 
RENDERER_API uint32 Alloc (FAllocatedVirtualTexture *VT)
 
RENDERER_API bool TryAlloc (uint32 InSize)
 
RENDERER_API void Free (FAllocatedVirtualTexture *VT)
 
uint32 GetNumAllocations () const
 
uint32 GetNumAllocatedPages () const
 
RENDERER_API void DumpToConsole (bool verbose)
 

Detailed Description

Allocates virtual memory address space.

Constructor & Destructor Documentation

◆ FVirtualTextureAllocator()

FVirtualTextureAllocator::FVirtualTextureAllocator ( uint32  Dimensions)
explicit

◆ ~FVirtualTextureAllocator()

FVirtualTextureAllocator::~FVirtualTextureAllocator ( )
inline

Member Function Documentation

◆ Alloc()

uint32 FVirtualTextureAllocator::Alloc ( FAllocatedVirtualTexture VT)

Allocate address space for the virtual texture.

Returns
(~0) if no space left, the virtual page address if successfully allocated.

◆ DumpToConsole()

void FVirtualTextureAllocator::DumpToConsole ( bool  verbose)

Output debugging information to the console.

◆ Find() [1/2]

FAllocatedVirtualTexture * FVirtualTextureAllocator::Find ( uint32  vAddress) const
inline

◆ Find() [2/2]

FAllocatedVirtualTexture * FVirtualTextureAllocator::Find ( uint32  vAddress,
uint32 OutLocal_vAddress 
) const

Translate a virtual page address in the address space to a local page address within a virtual texture.

Returns
nullptr If there is no virtual texture allocated at this address.

◆ Free()

void FVirtualTextureAllocator::Free ( FAllocatedVirtualTexture VT)

Free the virtual texture.

◆ GetAllocatedHeight()

uint32 FVirtualTextureAllocator::GetAllocatedHeight ( ) const
inline

◆ GetAllocatedWidth()

uint32 FVirtualTextureAllocator::GetAllocatedWidth ( ) const
inline

◆ GetNumAllocatedPages()

uint32 FVirtualTextureAllocator::GetNumAllocatedPages ( ) const
inline

Get current number of allocated pages.

◆ GetNumAllocations()

uint32 FVirtualTextureAllocator::GetNumAllocations ( ) const
inline

Get current number of allocations.

◆ Initialize()

void FVirtualTextureAllocator::Initialize ( uint32  MaxSize)

Initialise the allocator

◆ TryAlloc()

bool FVirtualTextureAllocator::TryAlloc ( uint32  InSize)

Test if an allocation of the given size will succeed.

Returns
false if there isn't enough space left.

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