Closed hYdos closed 1 year ago
Yeah, unfortunately static inline
isn't supported directly by bindgen. For most of these the best option seems to port it manually, e.g. https://github.com/rust3ds/citro3d-rs/blob/main/citro3d-sys/src/uniforms.rs and https://github.com/rust3ds/citro3d-rs/blob/main/citro3d-sys/src/texenv.rs
Similarly, some macros needed to be ported over as well. I don't know of a better alternative than translating it by hand, but hopefully writing safe Rust wrappers over everything (and translating some more examples) will help identify the missing parts.
If there wasnt that dependency issue with citro3d-rs and ctru-rs I would pr the normal mapping one im currently working on at the moment but sadly its stopping me from using the safe wrapper
This should be resolved now with #26 which generates bindings for static inline
functions at compile-time. I just double checked and C3D_TexSetFilter
is in there now! There might be some performance implications since of course it can't be inlined across FFI boundaries, but at least the API should be usable now.
After looking for a reference to
C3D_TexSetFilter
inside of the bindings, I've come to find out thatC3D_TexSetFilter
is an inlined function inside ofc3d/texture.h
which has been missed.Do keep in mind the missing binding is a static inline, So its missing