(path_ptr: *const u8)
| 895 | |
| 896 | #[no_mangle] |
| 897 | pub extern "C" fn bloom_load_texture(path_ptr: *const u8) -> f64 { |
| 898 | let path = str_from_header(path_ptr); |
| 899 | match std::fs::read(path) { |
| 900 | Ok(data) => { |
| 901 | let eng = engine(); |
| 902 | let EngineState { ref mut textures, ref mut renderer, .. } = *eng; |
| 903 | textures.load_texture(renderer, &data) |
| 904 | } |
| 905 | Err(_) => 0.0, |
| 906 | } |
| 907 | } |
| 908 | |
| 909 | #[no_mangle] |
| 910 | pub extern "C" fn bloom_unload_texture(handle: f64) { |
nothing calls this directly
no test coverage detected