Twinklebear / embree-rs

Rust bindings to Embree 3
MIT License
35 stars 14 forks source link

How to custom intersection filter? #12

Closed matthiascy closed 3 years ago

matthiascy commented 3 years ago

Hi, I want to know if it's possible to use filter functions from rust side? Or should I define the function following the C convention as declared in sys module? Thanks!

Twinklebear commented 3 years ago

Hi @matthiascy , right now this isn't possible through the Rust API as I haven't set up any support for filter functions/other callbacks Embree can use. So at the moment you'd need to do this through the sys crate API and define a C-callable Rust function that Embree can call.

matthiascy commented 3 years ago

Thank you for the response!