Module retained

Source
Expand description

Retained low-poly geometry and ordered instanced draw recording.

Structs§

Command
ABI: kind 0 = immediate, kind 1 = retained, kind 2 = flagged triangles, kind 3 = instanced sprites, kind 4 = post-processing world/HUD boundary (index 0; see post). Preserves transparency/UI order. Hosts skip unknown kinds.
InstanceGroupError
A group’s failure location and existing retained-draw diagnostic.
InstanceGroupReport
Outcome of one atomic draw_residents_checked call.
ResidentMesh
RetainedBatch
ABI: 224 bytes. Lighting: direction.xyz/enabled, eye.xyz/ambient, fog.rgba, start/end/padding.
RetainedBufferCapacities
Retained CPU buffer capacities, in elements (not bytes or GPU allocations).
RetainedRejections
Rejected retained operations since the last reset_telemetry, on this thread.
RetainedTelemetry
A copy of retained resource usage on the calling renderer thread.

Enums§

DrawError
Why a retained draw cannot be submitted. Matrix coordinates are zero-based.
MeshError
A retained mesh authoring or storage error. All offsets are zero-based.

Constants§

VERTEX_BODY
Same vertex-lighting/fog equations as the CPU immediate path, evaluated by the GPU.

Functions§

draw_resident_checked
Checked counterpart of crate::draw_resident, using the current camera and material. Returns Ok(true) for a visible recorded draw and Ok(false) when culled (a shadow-only instance may still be recorded). Validation runs even for culled draws; an error records nothing. Skinned geometry requires crate::draw_skinned with its palette.
draw_residents_checked
Atomically submit a caller slice of resident mesh/model pairs using the current camera, material, lighting, visibility and shadow settings.
reset_telemetry
Return and zero rejection counters for this thread without allocating.
telemetry_snapshot
Snapshot retained usage, limits, buffer capacities and rejection counters.
validate_mesh
Check source geometry without allocating, registering a mesh, or using a GPU. Checks every source vertex, including unused vertices and UVs. Zero normals, degenerate triangles, and UVs outside 0..1 remain valid. This checks the individual static-mesh budget, not currently available registry capacity.
validate_transform
Check a finite affine model matrix and its inverse-transpose normal matrix. Uses only stack storage. Reflections, shear, and nonuniform scale are valid; projection belongs in the camera matrix. Does not evaluate shader arithmetic or guarantee that extreme finite vertex/transform products cannot overflow.