Function in ldk_renderer.h

ldk_renderer_submit_mesh

Submit a mesh instance for scene rendering this frame. The mesh and material handles are validated against their renderer caches, then queued with the supplied world transform. The queued mesh is rendered during ldk_renderer_render_frame() for every submitted view. Submitted mesh instances are transient frame data. After rendering, the renderer clears the submitted mesh queue.

LDK_API bool ldk_renderer_submit_mesh(
 LDKRenderer *renderer,
 LDKResourceMesh mesh,
 LDKResourceMaterial material,
 Mat4 world
);

Parameters

LDKRenderer *renderer
Renderer instance.
LDKResourceMesh mesh
Mesh resource handle to render.
LDKResourceMaterial material
Material resource handle to use.
Mat4 world
World transform for this mesh instance.

Returns

true if the mesh was submitted, false otherwise.

Function in ldk_renderer.h

ldk_renderer_submit_mesh_range

Submit a contiguous index range of a mesh for scene rendering. This is the ranged form of ldk_renderer_submit_mesh(). The mesh resource remains independent of material topology; callers use this function to submit an individual submesh with its resolved material.

LDK_API bool ldk_renderer_submit_mesh_range(
 LDKRenderer *renderer,
 LDKResourceMesh mesh,
 LDKResourceMaterial material,
 u32 first_index,
 u32 index_count,
 Mat4 world
);

Parameters

LDKRenderer *renderer
Renderer instance.
LDKResourceMesh mesh
Mesh resource handle to render.
LDKResourceMaterial material
Material resource handle to use.
u32 first_index
First mesh index to draw.
u32 index_count
Number of indices to draw.
Mat4 world
World transform for this mesh instance.

Returns

true if the mesh range was queued, false otherwise.

Function in ldk_renderer.h

ldk_renderer_submit_mesh_range_with_flags

Submit renderer mesh range with flags.

LDK_API bool ldk_renderer_submit_mesh_range_with_flags(
 LDKRenderer *renderer,
 LDKResourceMesh mesh,
 LDKResourceMaterial material,
 u32 first_index,
 u32 index_count,
 Mat4 world,
 u32 flags
);

Parameters

LDKRenderer *renderer
Renderer receiving this request.
LDKResourceMesh mesh
Mesh resource used by the operation.
LDKResourceMaterial material
Material used by the operation.
u32 first_index
First mesh index to submit.
u32 index_count
Number of indices to submit.
Mat4 world
Object-to-world transformation matrix.
u32 flags
Bitmask of options controlling this operation.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_renderer.h

ldk_renderer_submit_mesh_to_view

Submit a mesh instance to a single render view for this frame. Unlike ldk_renderer_submit_mesh(), this mesh is only drawn while rendering the view identified by view_id. This is intended for view-local scene content that must not appear in other views. The view does not need to have been submitted before this call. If no view with the supplied ID is submitted during the frame, the mesh is not drawn.

LDK_API bool ldk_renderer_submit_mesh_to_view(
 LDKRenderer *renderer,
 LDKRendererViewId view_id,
 LDKResourceMesh mesh,
 LDKResourceMaterial material,
 Mat4 world
);

Parameters

LDKRenderer *renderer
Renderer instance.
LDKRendererViewId view_id
ID of the only view that should draw this mesh.
LDKResourceMesh mesh
Mesh resource handle to render.
LDKResourceMaterial material
Material resource handle to use.
Mat4 world
World transform for this mesh instance.

Returns

true if the mesh was queued, false otherwise.

Function in ldk_renderer.h

ldk_renderer_submit_mesh_with_flags

Submit renderer mesh with flags.

LDK_API bool ldk_renderer_submit_mesh_with_flags(
 LDKRenderer *renderer,
 LDKResourceMesh mesh,
 LDKResourceMaterial material,
 Mat4 world,
 u32 flags
);

Parameters

LDKRenderer *renderer
Renderer receiving this request.
LDKResourceMesh mesh
Mesh resource used by the operation.
LDKResourceMaterial material
Material used by the operation.
Mat4 world
Object-to-world transformation matrix.
u32 flags
Bitmask of options controlling this operation.

Returns

True if the operation succeeds; false otherwise.