UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMeshBatchElement Struct Reference

#include <MeshBatch.h>

Public Member Functions

int32 GetNumPrimitives () const
 
 FMeshBatchElement ()
 

Public Attributes

FRHIUniformBufferPrimitiveUniformBuffer
 
const TUniformBuffer< FPrimitiveUniformShaderParameters > * PrimitiveUniformBufferResource
 
FUniformBufferRHIRef LooseParametersUniformBuffer
 
const FIndexBufferIndexBuffer
 
FMeshBatchElementDynamicIndexBuffer DynamicIndexBuffer
 
union { 
 
   uint32 *   InstanceRuns 
 
   const class FSplineMeshSceneProxy *   SplineMeshSceneProxy 
 
};  
 
const voidUserData
 
voidVertexFactoryUserData
 
FRHIBufferIndirectArgsBuffer
 
uint32 IndirectArgsOffset
 
EPrimitiveIdMode PrimitiveIdMode: PrimID_NumBits + 1
 
uint32 FirstIndex
 
uint32 NumPrimitives
 
uint32 NumInstances
 
uint32 BaseVertexIndex
 
uint32 MinVertexIndex
 
uint32 MaxVertexIndex
 
int32 UserIndex
 
float MinScreenSize
 
float MaxScreenSize
 
uint32 InstancedLODIndex: 4
 
uint32 InstancedLODRange: 4
 
uint32 bUserDataIsColorVertexBuffer: 1
 
uint32 bIsSplineProxy: 1
 
uint32 bIsInstanceRuns: 1
 
uint32 bForceInstanceCulling: 1
 
uint32 bPreserveInstanceOrder: 1
 
uint32 bFetchInstanceCountFromScene: 1
 
int32 VisualizeElementIndex: 8
 
FColor SkinCacheDebugColor = FColor::White
 
const FMeshBatchDynamicPrimitiveDataDynamicPrimitiveData
 
uint32 DynamicPrimitiveIndex
 
uint32 DynamicPrimitiveInstanceSceneDataOffset
 

Detailed Description

A batch mesh element definition.

Constructor & Destructor Documentation

◆ FMeshBatchElement()

FMeshBatchElement::FMeshBatchElement ( )
inline

Member Function Documentation

◆ GetNumPrimitives()

int32 FMeshBatchElement::GetNumPrimitives ( ) const
inline

Member Data Documentation

◆ [union]

union { ... } FMeshBatchElement

◆ BaseVertexIndex

uint32 FMeshBatchElement::BaseVertexIndex

◆ bFetchInstanceCountFromScene

uint32 FMeshBatchElement::bFetchInstanceCountFromScene

◆ bForceInstanceCulling

uint32 FMeshBatchElement::bForceInstanceCulling

◆ bIsInstanceRuns

uint32 FMeshBatchElement::bIsInstanceRuns

◆ bIsSplineProxy

uint32 FMeshBatchElement::bIsSplineProxy

◆ bPreserveInstanceOrder

uint32 FMeshBatchElement::bPreserveInstanceOrder

◆ bUserDataIsColorVertexBuffer

uint32 FMeshBatchElement::bUserDataIsColorVertexBuffer

◆ DynamicIndexBuffer

FMeshBatchElementDynamicIndexBuffer FMeshBatchElement::DynamicIndexBuffer

Store dynamic index buffer This is used for objects whose triangles are dynamically sorted for a particular view (i.e., per-object order-independent-transparency)

◆ DynamicPrimitiveData

const FMeshBatchDynamicPrimitiveData* FMeshBatchElement::DynamicPrimitiveData

Source instance scene data and payload data for dynamic primitives. Must be provided for dynamic primitives that have more than a single instance. NOTE: The lifetime of the object pointed to is expected to match or exceed that of the mesh batch itself.

◆ DynamicPrimitiveIndex

uint32 FMeshBatchElement::DynamicPrimitiveIndex

◆ DynamicPrimitiveInstanceSceneDataOffset

uint32 FMeshBatchElement::DynamicPrimitiveInstanceSceneDataOffset

◆ FirstIndex

uint32 FMeshBatchElement::FirstIndex

◆ IndexBuffer

const FIndexBuffer* FMeshBatchElement::IndexBuffer

The index buffer to draw the mesh batch with.

◆ IndirectArgsBuffer

FRHIBuffer* FMeshBatchElement::IndirectArgsBuffer

◆ IndirectArgsOffset

uint32 FMeshBatchElement::IndirectArgsOffset

◆ InstancedLODIndex

uint32 FMeshBatchElement::InstancedLODIndex

◆ InstancedLODRange

uint32 FMeshBatchElement::InstancedLODRange

◆ InstanceRuns

uint32* FMeshBatchElement::InstanceRuns

If !bIsSplineProxy, Instance runs, where number of runs is specified by NumInstances. Run structure is [StartInstanceIndex, EndInstanceIndex].

◆ LooseParametersUniformBuffer

FUniformBufferRHIRef FMeshBatchElement::LooseParametersUniformBuffer

Uniform buffer containing the "loose" parameters that aren't wrapped in other uniform buffers. Those parameters can be unique per mesh batch, e.g. view dependent.

◆ MaxScreenSize

float FMeshBatchElement::MaxScreenSize

◆ MaxVertexIndex

uint32 FMeshBatchElement::MaxVertexIndex

◆ MinScreenSize

float FMeshBatchElement::MinScreenSize

◆ MinVertexIndex

uint32 FMeshBatchElement::MinVertexIndex

◆ NumInstances

uint32 FMeshBatchElement::NumInstances

Number of instances to draw. If InstanceRuns is valid, this is actually the number of runs in InstanceRuns.

◆ NumPrimitives

uint32 FMeshBatchElement::NumPrimitives

When 0, IndirectArgsBuffer will be used.

◆ PrimitiveIdMode

EPrimitiveIdMode FMeshBatchElement::PrimitiveIdMode

Assigned by renderer

◆ PrimitiveUniformBuffer

FRHIUniformBuffer* FMeshBatchElement::PrimitiveUniformBuffer

Primitive uniform buffer RHI Must be null for vertex factories that manually fetch primitive data from scene data, in which case FPrimitiveSceneProxy::UniformBuffer will be used.

◆ PrimitiveUniformBufferResource

const TUniformBuffer<FPrimitiveUniformShaderParameters>* FMeshBatchElement::PrimitiveUniformBufferResource

Primitive uniform buffer to use for rendering, used when PrimitiveUniformBuffer is null. This interface allows a FMeshBatchElement to be setup for a uniform buffer that has not been initialized yet, (TUniformBuffer* is known but not the FRHIUniformBuffer*)

◆ SkinCacheDebugColor

FColor FMeshBatchElement::SkinCacheDebugColor = FColor::White

Skin Cache debug visualization color.

◆ SplineMeshSceneProxy

const class FSplineMeshSceneProxy* FMeshBatchElement::SplineMeshSceneProxy

If bIsSplineProxy, a pointer back to the proxy

◆ UserData

const void* FMeshBatchElement::UserData

◆ UserIndex

int32 FMeshBatchElement::UserIndex

◆ VertexFactoryUserData

void* FMeshBatchElement::VertexFactoryUserData

◆ VisualizeElementIndex

int32 FMeshBatchElement::VisualizeElementIndex

Conceptual element index used for debug viewmodes.


The documentation for this struct was generated from the following file: