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

Function bloom_load_model

native/android/src/lib.rs:720–730  ·  view source on GitHub ↗
(path_ptr: *const u8)

Source from the content-addressed store, hash-verified

718
719#[no_mangle]
720pub extern "C" fn bloom_load_model(path_ptr: *const u8) -> f64 {
721 let path = str_from_header(path_ptr);
722 match std::fs::read(resolve_path(path)) {
723 Ok(data) => {
724 let eng = engine();
725 let renderer_ptr = &mut eng.renderer as *mut crate::Renderer;
726 eng.models.load_model_with_textures(&data, unsafe { &mut *renderer_ptr })
727 }
728 Err(_) => 0.0,
729 }
730}
731#[no_mangle]
732pub extern "C" fn bloom_draw_model(handle: f64, x: f64, y: f64, z: f64, scale: f64, r: f64, g: f64, b: f64, a: f64) {
733 let eng = engine();

Callers

nothing calls this directly

Calls 4

str_from_headerFunction · 0.85
resolve_pathFunction · 0.70
engineFunction · 0.70

Tested by

no test coverage detected