Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Theoretically, Metal can be called from C by going directly through the Objective-C runtime API, but this requires either macro magic (like: https://github.com/garettbass/oc/), or code-generated headers (which was most likely used in the official Metal-cpp wrapper: https://developer.apple.com/metal/cpp/)

But it's not a big deal to move all the ObjC code into a separate .m source file and expose a smaller and higher level C API.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: