LLGL
LLGL copied to clipboard
Is C# wrapper cross-platform?
It seems like current C# wrapper using C++/CLI. (Correct me if I'm wrong) Isn't C++/CLI only supported on Windows platform for now? Microsoft introduced C++/CLI support to .NET Core 3 but unfortunately it is only working on Windows.
PInvoke is the only option right now for cross-platform C# binding.
Hi, I'm afraid you're right. I barely used C# on other platform other than Windows except a few times with Mono but no C/C++ bindings. If you can refer me to some good references for portable C++ to C# bindings, let me know.
https://github.com/microsoft/CsWinRT
With the new C API, it will be easy to use this from C# now :)
@jayrulez wouldn't that still require to also declare all enums and structs in C#, though?
Yes, that's still necessary but this is what everyone does anyway. Take a look at the bgfx bindings as an example: https://github.com/bkaradzic/bgfx/blob/master/bindings/cs/bgfx.cs
Better late than never, but this is resolved with 8e00be1. It also includes two C# examples that are no longer using C++/CLI.