OGRECave/ogre-next

Is there a C API?

Opened this issue · 2 comments

I have been looking around for C language bindings for ogre-next. My purpose is to use ogre-next from another language via the C API. Does anyone know of a C language bindings I can use?

Hi!

No, there is not.

Ogre1 has SWIG bindings and there is a WIP PR that wanted to add SWIG based on Ogre1. The PR aims to add Python bindings though, and a quick google it seems that SWIG does not support generating C bindings.

It feels odd, automatically generating C bindings using libclang by parsing headers should be a piece cake.

We already have a python script that parses libclang and could be repurposed to parse the entire database and generate bindings.

I also have a C++ (instead of Python) project that parses headers using libclang; in case you're interested.

It seems that such project already exists.

I don't have plans of adding C bindings, but if you want to add a PR it will be welcomed.

Thanks! Currently attempting to generate bindings for my target language directly, which is nim. Will post a link to the repo here if I'm successful.