pub fn draw_resident_checked(
mesh: &ResidentMesh,
model: Mat4,
) -> Result<bool, DrawError>Expand description
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.
Shares the existing resident buffers and frame recording path. Validation uses stack storage; frame buffers retain their capacity across frames.
use ferravex_render::{mesh::Mesh3d, Mat4, Vec3, WHITE,
retained::{ResidentMesh, draw_resident_checked}};
let mesh = ResidentMesh::try_new(&Mesh3d::cuboid(Vec3::ONE, WHITE).mesh)?;
// After selecting your camera/material, in the frame loop:
let visible = draw_resident_checked(&mesh, Mat4::IDENTITY)?;