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

#include <TextureLayout.h>

Public Member Functions

 FBinnedTextureLayout (FIntPoint InMaxSize, int32 InBinSizeTexels)
 
ENGINE_API bool AddElement (FIntPoint ElementSize, FIntPoint &OutElementMin)
 
ENGINE_API void RemoveElement (FIntRect Element)
 

Detailed Description

A simple binned style atlas layout, which uses FTextureLayout as the bin allocator. Binning greatly reduces fragmentation over time with many allocations of different sizes and lifetimes, but ties up free memory in other bins.
Binning also greatly reduces the FTextureLayout tree depth, and therefore allocation cost. Best results when the number of unique allocation sizes are small.

Constructor & Destructor Documentation

◆ FBinnedTextureLayout()

FBinnedTextureLayout::FBinnedTextureLayout ( FIntPoint  InMaxSize,
int32  InBinSizeTexels 
)
inline

Member Function Documentation

◆ AddElement()

bool FBinnedTextureLayout::AddElement ( FIntPoint  ElementSize,
FIntPoint OutElementMin 
)

Allocates an element from the atlas layout. Returns true if allocation succeeds. Note: Sort allocations by descending size for best packing.

◆ RemoveElement()

void FBinnedTextureLayout::RemoveElement ( FIntRect  Element)

Removes an element which was previously added.


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