summaryrefslogtreecommitdiff
path: root/bindgen/rust/src/resources.rs
blob: e7f4505d25e6e0388ce8a8eb49a60d85c0582188 (plain)
1
2
3
4
5
6
7
8
9
10
use std::ffi::CString;

use celeritas_sys::{ModelHandle, 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)
}