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

Function bloom_load_texture

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

Source from the content-addressed store, hash-verified

1813
1814#[no_mangle]
1815pub extern "C" fn bloom_load_texture(path_ptr: *const u8) -> f64 {
1816 let path = str_from_header(path_ptr);
1817 match std::fs::read(resolve_path(path)) {
1818 Ok(data) => {
1819 let eng = engine();
1820 let renderer_ptr = &mut eng.renderer as *mut Renderer;
1821 eng.textures.load_texture(unsafe { &mut *renderer_ptr }, &data)
1822 }
1823 Err(_) => 0.0,
1824 }
1825}
1826
1827#[no_mangle]
1828pub extern "C" fn bloom_unload_texture(handle: f64) {

Callers

nothing calls this directly

Calls 4

str_from_headerFunction · 0.85
load_textureMethod · 0.80
resolve_pathFunction · 0.70
engineFunction · 0.70

Tested by

no test coverage detected