MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / submit_material_draw

Method submit_material_draw

native/shared/src/renderer/mod.rs:13375–13394  ·  view source on GitHub ↗

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],
    )

Source from the content-addressed store, hash-verified

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

Callers 7

bloom_draw_materialFunction · 0.80
bloom_draw_materialFunction · 0.80
bloom_draw_materialFunction · 0.80
bloom_draw_materialFunction · 0.80
bloom_draw_materialFunction · 0.80
bloom_draw_materialFunction · 0.80
bloom_draw_materialFunction · 0.80

Calls 4

mat4_multiplyFunction · 0.85
mat4_translateFunction · 0.85
mat4_scaleFunction · 0.85
submit_drawMethod · 0.80

Tested by

no test coverage detected