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

Function bloom_draw_material

native/ios/src/lib.rs:1549–1569  ·  view source on GitHub ↗
(
    material: f64,
    mesh_handle: f64,
    mesh_idx: f64,
    x: f64, y: f64, z: f64, scale: f64,
    r: f64, g: f64, b: f64, a: f64,
)

Source from the content-addressed store, hash-verified

1547
1548#[no_mangle]
1549pub extern "C" fn bloom_draw_material(
1550 material: f64,
1551 mesh_handle: f64,
1552 mesh_idx: f64,
1553 x: f64, y: f64, z: f64, scale: f64,
1554 r: f64, g: f64, b: f64, a: f64,
1555) {
1556 let eng = engine();
1557 let handle_bits = mesh_handle.to_bits();
1558 if let Some(model) = eng.models.get(mesh_handle) {
1559 eng.renderer.cache_model_if_static(handle_bits, &model.meshes);
1560 }
1561 eng.renderer.submit_material_draw(
1562 material as u32,
1563 handle_bits,
1564 mesh_idx as usize,
1565 [x as f32, y as f32, z as f32],
1566 scale as f32,
1567 [(r / 255.0) as f32, (g / 255.0) as f32, (b / 255.0) as f32, (a / 255.0) as f32],
1568 );
1569}
1570
1571#[no_mangle]
1572pub extern "C" fn bloom_load_model_animation(path_ptr: *const u8) -> f64 {

Callers 3

drawMeshWithMaterialFunction · 0.50
drawModelWithMaterialFunction · 0.50
drawImposterAtlasFunction · 0.50

Calls 4

cache_model_if_staticMethod · 0.80
submit_material_drawMethod · 0.80
engineFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected