blob: 89cf6d761517caeebbf579f3b9400a227a3708b9 (
plain)
1
2
3
4
5
6
7
8
9
10
|
use std::{ffi::CString, path::Path};
use celeritas_sys::{ModelHandle, ModelLoad, ModelLoad_gltf};
/// Load a gltf from disk
pub fn model_load_gltf(path: &str) -> Option<ModelHandle> {
let path_str = CString::new(path).unwrap();
let handle = unsafe { ModelLoad_gltf(path_str.as_ptr() as *const _, false) };
Some(handle)
}
|