MikePopoloski / SharpBgfx

C# bindings for the bgfx graphics library
MIT License
169 stars 32 forks source link

Generated bgfx bindings #25

Closed raizam closed 5 years ago

raizam commented 6 years ago

Hi, I've automated generation of raw bgfx pinvokes directly from bgfx C99 header. It's still WIP and not tested yet at all, but it's starting to take shape. Is this something you may be interested for sharpbgfx?

MikePopoloski commented 5 years ago

I'm sure that's a useful thing in general, but for this project writing the pinvokes is by far the easiest and least time consuming part of maintaining the library. I don't think the generator would save me much effort.

raizam commented 5 years ago

I'm making this project to write a smart pinvoke generator based on Clang. Currently it scans every functions, extract types recursively from arguments, look at what cpp call is underneath, extract the original cpp function name and documentation...

So yes, it would save you a lot maintenance effort :)

raizam commented 5 years ago

problem is that using generated pinvokes would be such a change that most of SharpBgfx would need to be rewritten, it would make more sense to write a new library. so this is why I've closed this issue.