Navigation
API > API/Runtime > API/Runtime/Renderer > API/Runtime/Renderer/InstanceCulling > API/Runtime/Renderer/InstanceCulling/FInstanceCullingContext > API/Runtime/Renderer/InstanceCulling/FInstanceCullingContext/SetupDrawCommands
References
| Module | Renderer |
| Header | /Engine/Source/Runtime/Renderer/Public/InstanceCulling/InstanceCullingContext.h |
| Include | #include "InstanceCulling/InstanceCullingContext.h" |
| Source | /Engine/Source/Runtime/Renderer/Private/InstanceCulling/InstanceCullingContext.cpp |
void SetupDrawCommands
&40;
TArrayView< const FStateBucketAuxData > StateBucketsAuxData,
FMeshCommandOneFrameArray & VisibleMeshDrawCommandsInOut,
bool bCompactIdenticalCommands,
int32 & MaxInstancesOut,
int32 & VisibleMeshDrawCommandsNumOut,
int32 & NewPassVisibleMeshDrawCommandsNumOut
&41;
Remarks
Allocate indirect arg slots for all meshes to use instancing, add commands that populate the indirect calls and index & id buffers, and Collapse all commands that share the same state bucket ID NOTE: VisibleMeshDrawCommandsInOut can only become shorter.