UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GlobalRenderResources.cpp File Reference
#include "GlobalRenderResources.h"
#include "RenderGraphUtils.h"
#include "Containers/ResourceArray.h"
#include "RenderCore.h"
#include "RenderUtils.h"
#include "RHIResourceUtils.h"
#include "Algo/Reverse.h"
#include "Async/Mutex.h"

Classes

struct  FColorBulkData
 
class  FColoredTexture< R, G, B, A >
 
class  FEmptyVertexBuffer
 
class  FEmptyUInt4VertexBuffer
 
class  FEmptyStructuredBuffer
 
class  FBlackFloat4StructuredBufferWithSRV
 
class  FBlackFloat4VertexBuffer
 
class  FDummyTransitionTexture
 
class  FBlackTextureWithSRV
 
class  FWhiteVertexBuffer
 
class  FBlackVertexBuffer
 
class  FWhiteVertexBufferWithRDG
 
class  FBlackVolumeTexture< PixelFormat, Alpha >
 
class  FBlackArrayTexture
 
class  FMipColorTexture
 
class  FSolidColorTextureCube
 
class  FBlackCubeArrayTexture
 
class  FBlackUintTexture
 
class  TDynamicBuffer< BufferType >
 
struct  TDynamicBufferPool< DynamicBufferType >
 

Namespaces

namespace  GlobalDynamicBuffer
 

Variables

int32 GMaxVertexBytesAllocatedPerFrame = 32 * 1024 * 1024
 
FAutoConsoleVariableRef CVarMaxVertexBytesAllocatedPerFrame (TEXT("r.MaxVertexBytesAllocatedPerFrame"), GMaxVertexBytesAllocatedPerFrame, TEXT("The maximum number of transient vertex buffer bytes to allocate before we start panic logging who is doing the allocations"))
 
int32 GGlobalBufferNumFramesUnusedThreshold = 30
 
FAutoConsoleVariableRef CVarGlobalBufferNumFramesUnusedThreshold (TEXT("r.NumFramesUnusedBeforeReleasingGlobalResourceBuffers"), GGlobalBufferNumFramesUnusedThreshold, TEXT("Number of frames after which unused global resource allocations will be discarded. Set 0 to ignore. (default=30)"))
 
FTextureWithSRVGWhiteTextureWithSRV = new TGlobalResource<FColoredTexture<255, 255, 255, 255>, FRenderResource::EInitPhase::Pre>
 
FTextureWithSRVGBlackTextureWithSRV = new TGlobalResource<FBlackTextureWithSRV, FRenderResource::EInitPhase::Pre>()
 
FTextureWithSRVGTransparentBlackTextureWithSRV = new TGlobalResource<FColoredTexture<0, 0, 0, 0>, FRenderResource::EInitPhase::Pre>
 
FTextureGDummyTransitionTexture = new TGlobalResource<FDummyTransitionTexture, FRenderResource::EInitPhase::Pre>
 
FTextureGWhiteTexture = GWhiteTextureWithSRV
 
FTextureGBlackTexture = GBlackTextureWithSRV
 
FTextureGTransparentBlackTexture = GTransparentBlackTextureWithSRV
 
FVertexBufferWithSRVGEmptyVertexBufferWithUAV = new TGlobalResource<FEmptyVertexBuffer, FRenderResource::EInitPhase::Pre>
 
FVertexBufferWithSRVGEmptyVertexBufferUInt4WithUAV = new TGlobalResource<FEmptyUInt4VertexBuffer, FRenderResource::EInitPhase::Pre>
 
FVertexBufferWithSRVGEmptyStructuredBufferWithUAV = new TGlobalResource<FEmptyStructuredBuffer, FRenderResource::EInitPhase::Pre>
 
FVertexBufferWithSRVGBlackFloat4StructuredBufferWithSRV = new TGlobalResource<FBlackFloat4StructuredBufferWithSRV, FRenderResource::EInitPhase::Pre>
 
FVertexBufferWithSRVGBlackFloat4VertexBufferWithSRV = new TGlobalResource<FBlackFloat4VertexBuffer, FRenderResource::EInitPhase::Pre>
 
FVertexBufferWithSRVGWhiteVertexBufferWithSRV = new TGlobalResource<FWhiteVertexBuffer, FRenderResource::EInitPhase::Pre>
 
FVertexBufferWithSRVGBlackVertexBufferWithSRV = new TGlobalResource<FBlackVertexBuffer, FRenderResource::EInitPhase::Pre>
 
FBufferWithRDGGWhiteVertexBufferWithRDG = new TGlobalResource<FWhiteVertexBufferWithRDG, FRenderResource::EInitPhase::Pre>()
 
FTextureGBlackVolumeTexture = new TGlobalResource<FBlackVolumeTexture<PF_B8G8R8A8, 0>, FRenderResource::EInitPhase::Pre>()
 
FTextureGBlackAlpha1VolumeTexture = new TGlobalResource<FBlackVolumeTexture<PF_B8G8R8A8, 255>, FRenderResource::EInitPhase::Pre>()
 
FTextureGBlackUintVolumeTexture = new TGlobalResource<FBlackVolumeTexture<PF_R8G8B8A8_UINT, 0>, FRenderResource::EInitPhase::Pre>()
 
FTextureGBlackArrayTexture = new TGlobalResource<FBlackArrayTexture, FRenderResource::EInitPhase::Pre>
 
FTextureGMipColorTexture = new FMipColorTexture
 
int32 GMipColorTextureMipLevels = FMipColorTexture::NumMips
 
const uint32 GDiffuseConvolveMipLevel = 4
 
FTextureGWhiteTextureCube = new TGlobalResource<FSolidColorTextureCube, FRenderResource::EInitPhase::Pre>(FColor::White)
 
FTextureGBlackTextureCube = new TGlobalResource<FSolidColorTextureCube, FRenderResource::EInitPhase::Pre>(FColor::Black)
 
FTextureGBlackTextureDepthCube = new TGlobalResource<FSolidColorTextureCube, FRenderResource::EInitPhase::Pre>(PF_ShadowDepth)
 
FTextureGBlackCubeArrayTexture = new TGlobalResource<FBlackCubeArrayTexture, FRenderResource::EInitPhase::Pre>
 
FTextureGBlackUintTexture = new TGlobalResource<FBlackUintTexture, FRenderResource::EInitPhase::Pre>
 
TGlobalResource< FNullColorVertexBuffer, FRenderResource::EInitPhase::PreGNullColorVertexBuffer
 
TGlobalResource< FNullVertexBuffer, FRenderResource::EInitPhase::PreGNullVertexBuffer
 
TGlobalResource< FScreenSpaceVertexBuffer, FRenderResource::EInitPhase::PreGScreenSpaceVertexBuffer
 
TGlobalResource< FTileVertexDeclaration, FRenderResource::EInitPhase::PreGTileVertexDeclaration
 
TGlobalResource< FCubeIndexBuffer, FRenderResource::EInitPhase::PreGCubeIndexBuffer
 
TGlobalResource< FTwoTrianglesIndexBuffer, FRenderResource::EInitPhase::PreGTwoTrianglesIndexBuffer
 
TGlobalResource< FEmptyResourceCollection, FRenderResource::EInitPhase::PreGEmptyResourceCollection
 

Variable Documentation

◆ CVarGlobalBufferNumFramesUnusedThreshold

FAutoConsoleVariableRef CVarGlobalBufferNumFramesUnusedThreshold(TEXT("r.NumFramesUnusedBeforeReleasingGlobalResourceBuffers"), GGlobalBufferNumFramesUnusedThreshold, TEXT("Number of frames after which unused global resource allocations will be discarded. Set 0 to ignore. (default=30)")) ( TEXT("r.NumFramesUnusedBeforeReleasingGlobalResourceBuffers")  ,
GGlobalBufferNumFramesUnusedThreshold  ,
TEXT("Number of frames after which unused global resource allocations will be discarded. Set 0 to ignore. (default=30)")   
)

◆ CVarMaxVertexBytesAllocatedPerFrame

FAutoConsoleVariableRef CVarMaxVertexBytesAllocatedPerFrame(TEXT("r.MaxVertexBytesAllocatedPerFrame"), GMaxVertexBytesAllocatedPerFrame, TEXT("The maximum number of transient vertex buffer bytes to allocate before we start panic logging who is doing the allocations")) ( TEXT("r.MaxVertexBytesAllocatedPerFrame")  ,
GMaxVertexBytesAllocatedPerFrame  ,
TEXT("The maximum number of transient vertex buffer bytes to allocate before we start panic logging who is doing the allocations"  
)

◆ GBlackAlpha1VolumeTexture

◆ GBlackArrayTexture

◆ GBlackCubeArrayTexture

◆ GBlackFloat4StructuredBufferWithSRV

◆ GBlackFloat4VertexBufferWithSRV

◆ GBlackTexture

FTexture* GBlackTexture = GBlackTextureWithSRV

◆ GBlackTextureCube

◆ GBlackTextureDepthCube

A black cube texture.

◆ GBlackTextureWithSRV

◆ GBlackUintTexture

◆ GBlackUintVolumeTexture

Global black volume texture resource.

◆ GBlackVertexBufferWithSRV

◆ GBlackVolumeTexture

Global black volume texture resource.

◆ GCubeIndexBuffer

◆ GDiffuseConvolveMipLevel

const uint32 GDiffuseConvolveMipLevel = 4

◆ GDummyTransitionTexture

◆ GEmptyResourceCollection

◆ GEmptyStructuredBufferWithUAV

◆ GEmptyVertexBufferUInt4WithUAV

◆ GEmptyVertexBufferWithUAV

◆ GGlobalBufferNumFramesUnusedThreshold

int32 GGlobalBufferNumFramesUnusedThreshold = 30

◆ GMaxVertexBytesAllocatedPerFrame

int32 GMaxVertexBytesAllocatedPerFrame = 32 * 1024 * 1024

◆ GMipColorTexture

FTexture* GMipColorTexture = new FMipColorTexture

◆ GMipColorTextureMipLevels

int32 GMipColorTextureMipLevels = FMipColorTexture::NumMips

Number of mip-levels in 'GMipColorTexture'

◆ GNullColorVertexBuffer

The global null color vertex buffer, which is set with a stride of 0 on meshes without a color component.

◆ GNullVertexBuffer

The global null vertex buffer, which is set with a stride of 0 on meshes

◆ GScreenSpaceVertexBuffer

◆ GTileVertexDeclaration

◆ GTransparentBlackTexture

FTexture* GTransparentBlackTexture = GTransparentBlackTextureWithSRV

◆ GTransparentBlackTextureWithSRV

FTextureWithSRV* GTransparentBlackTextureWithSRV = new TGlobalResource<FColoredTexture<0, 0, 0, 0>, FRenderResource::EInitPhase::Pre>

◆ GTwoTrianglesIndexBuffer

◆ GWhiteTexture

FTexture* GWhiteTexture = GWhiteTextureWithSRV

◆ GWhiteTextureCube

◆ GWhiteTextureWithSRV

FTextureWithSRV* GWhiteTextureWithSRV = new TGlobalResource<FColoredTexture<255, 255, 255, 255>, FRenderResource::EInitPhase::Pre>

◆ GWhiteVertexBufferWithRDG

◆ GWhiteVertexBufferWithSRV