LDKInstancedMeshSource

typedef struct LDKInstancedMeshSource{
  LDKMeshSource source;
  Mat4 *instances;
  u32 *instance_colors;
  u32 instance_count;
  u32 instance_capacity;
}LDKInstancedMeshSource;

ldk_instanced_mesh_source_reserve_instances

Ensure capacity for at least count local transforms. Failure preserves the current buffer and instance count. The component owns the buffer.

LDK_API bool ldk_instanced_mesh_source_reserve_instances(
 LDKInstancedMeshSource *source,
 u32 count
);

Parameters

LDKInstancedMeshSource *source
Source object or source data for this operation.
u32 count
Number of items to process.

Returns

True if the operation succeeds; false otherwise.

ldk_instanced_mesh_source_resize_instances

Resize the local transform set while retaining allocated capacity. Newly exposed transforms are identity and their colors are opaque white. Failure preserves the set. Systems may write the component buffers before render.

LDK_API bool ldk_instanced_mesh_source_resize_instances(
 LDKInstancedMeshSource *source,
 u32 count
);

Parameters

LDKInstancedMeshSource *source
Source object or source data for this operation.
u32 count
Number of items to process.

Returns

True if the operation succeeds; false otherwise.

ldk_instanced_mesh_source_set_instances

Copy local transforms. Newly exposed colors are opaque white. Zero count clears the active set but retains capacity. Failure preserves it. Use existing mesh-source setters on source for mesh/material authoring.

LDK_API bool ldk_instanced_mesh_source_set_instances(
 LDKInstancedMeshSource *source,
 const Mat4 *instances,
 u32 count
);

Parameters

LDKInstancedMeshSource *source
Source object or source data for this operation.
const Mat4 *instances
Instances used by this operation.
u32 count
Number of items to process.

Returns

True if the operation succeeds; false otherwise.