(vertex_ptr: *const f32, vertex_count: f64, index_ptr: *const u32, index_count: f64)
| 1230 | |
| 1231 | #[no_mangle] |
| 1232 | pub extern "C" fn bloom_create_mesh(vertex_ptr: *const f32, vertex_count: f64, index_ptr: *const u32, index_count: f64) -> f64 { |
| 1233 | if vertex_ptr.is_null() || index_ptr.is_null() { return 0.0; } |
| 1234 | let vcount = vertex_count as usize; |
| 1235 | let icount = index_count as usize; |
| 1236 | let vertex_data = unsafe { std::slice::from_raw_parts(vertex_ptr, vcount * 12) }; |
| 1237 | let index_data = unsafe { std::slice::from_raw_parts(index_ptr, icount) }; |
| 1238 | engine().models.create_mesh(vertex_data, index_data) |
| 1239 | } |
| 1240 | |
| 1241 | // ============================================================ |
| 1242 | // Phase 1c — material system FFI |
no test coverage detected