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

Function bloom_load_model

native/tvos/src/lib.rs:2055–2065  ·  view source on GitHub ↗
(path_ptr: *const u8)

Source from the content-addressed store, hash-verified

2053
2054#[no_mangle]
2055pub extern "C" fn bloom_load_model(path_ptr: *const u8) -> f64 {
2056 let path = str_from_header(path_ptr);
2057 match std::fs::read(resolve_path(path)) {
2058 Ok(data) => {
2059 let eng = engine();
2060 let renderer_ptr = &mut eng.renderer as *mut crate::Renderer;
2061 eng.models.load_model_with_textures(&data, unsafe { &mut *renderer_ptr })
2062 }
2063 Err(_) => 0.0,
2064 }
2065}
2066
2067#[no_mangle]
2068pub extern "C" fn bloom_draw_model(handle: f64, x: f64, y: f64, z: f64, scale: f64, r: f64, g: f64, b: f64, a: f64) {

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