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

Function bloom_load_model

native/windows/src/lib.rs:957–967  ·  view source on GitHub ↗
(path_ptr: *const u8)

Source from the content-addressed store, hash-verified

955
956#[no_mangle]
957pub extern "C" fn bloom_load_model(path_ptr: *const u8) -> f64 {
958 let path = str_from_header(path_ptr);
959 match std::fs::read(path) {
960 Ok(data) => {
961 let eng = engine();
962 let renderer_ptr = &mut eng.renderer as *mut Renderer;
963 eng.models.load_model_with_textures(&data, unsafe { &mut *renderer_ptr })
964 }
965 Err(_) => 0.0,
966 }
967}
968#[no_mangle]
969pub extern "C" fn bloom_draw_model(handle: f64, x: f64, y: f64, z: f64, scale: f64, r: f64, g: f64, b: f64, a: f64) {
970 let eng = engine();

Callers

nothing calls this directly

Calls 3

str_from_headerFunction · 0.85
engineFunction · 0.70

Tested by

no test coverage detected