embree4_rs/
lib.rs

1//! [![Crates.io](https://img.shields.io/crates/v/embree4-rs.svg)](https://crates.io/crates/embree4-rs)
2//!
3//! High-level wrapper for [Intel's Embree](https://www.embree.org/) 4 high-performance ray tracing
4//! library.
5//!
6//! FFI Bindings from [embree4-sys](https://crates.io/crates/embree4-sys).
7//!
8//! A valid Embree installation is required. See
9//! [Installation of Embree](https://github.com/embree/embree#installation-of-embree)
10//! from the Embree docs.
11//!
12//! # Documentation
13//!
14//! Docs at [docs.rs](https://docs.rs/embree4-rs).
15//!
16//! See the [examples/](https://github.com/psytrx/embree4-rs/tree/main/examples) for a quick start
17//! on how to use this crate.
18
19mod device;
20pub mod geometry;
21mod scene;
22
23pub use device::*;
24pub use scene::*;
25
26fn device_error_raw(device: embree4_sys::RTCDevice) -> Option<embree4_sys::RTCError> {
27    let err = unsafe { embree4_sys::rtcGetDeviceError(device) };
28    if err != embree4_sys::RTCError::NONE {
29        Some(err)
30    } else {
31        None
32    }
33}