Submit a material draw against a cached mesh. `mesh_handle` is the value returned by `cache_model_if_static` (same as the scene pipeline's cached-model path).
(
&mut self,
material: material_system::MaterialHandle,
mesh_handle: u64,
mesh_idx: usize,
position: [f32; 3],
scale: f32,
tint: [f32; 4],
)
| 13373 | /// the value returned by `cache_model_if_static` (same as the |
| 13374 | /// scene pipeline's cached-model path). |
| 13375 | pub fn submit_material_draw( |
| 13376 | &mut self, |
| 13377 | material: material_system::MaterialHandle, |
| 13378 | mesh_handle: u64, |
| 13379 | mesh_idx: usize, |
| 13380 | position: [f32; 3], |
| 13381 | scale: f32, |
| 13382 | tint: [f32; 4], |
| 13383 | ) { |
| 13384 | let model = mat4_multiply( |
| 13385 | mat4_translate(IDENTITY_MAT4, position), |
| 13386 | mat4_scale(IDENTITY_MAT4, [scale, scale, scale]), |
| 13387 | ); |
| 13388 | let mvp = mat4_multiply(self.current_vp_matrix, model); |
| 13389 | self.material_system.submit_draw( |
| 13390 | &self.device, &self.queue, &self.joint_buffer, |
| 13391 | material, mesh_handle, mesh_idx, |
| 13392 | mvp, model, mvp, tint, [0, 0, 0, 0], |
| 13393 | ); |
| 13394 | } |
| 13395 | |
| 13396 | /// EN-001 — submit an instanced material draw. The mesh is drawn |
| 13397 | /// `instance_count` times via a single `draw_indexed` with the |
no test coverage detected