DiligentGraphics/DiligentCore

Dot NET tasks

Opened this issue · 9 comments

  • Fix test crashes
  • Rework script to parse the latest tag and automatic publish new package:
    • When the tag is vX.Y.Z, use version x.y.z
    • When the tag is APIXYZWWW, use version x.y.z-w (it is important to use - as this will denote a prerelease package)
  • Add documentation for .NET build
  • Optimize CI build
    • Parallelize native build to reduce workflow run time
    • Combine publishing NuGet package action with building - there seem to be no reason to do this separately

Will Diligent .NET support binaries to Linux ?

Will Diligent .NET support binaries to Linux ?

I don't plan to do that at the moment, user demand for the nuget package is not high. To support the Linux version I need to put a lot of effort into modifying SharpGenTools

Why do you need to modify SharpGenTools to support Linux? Shouldn't the bindings be cross platform?

Why do you need to modify SharpGenTools to support Linux? Shouldn't the bindings be cross platform?

Both native dll and dll with managed code differ from platform to platform. So we need to add a feature that selects which dll folder should be used depending on the OS used, like it is done for selecting dlls depending on the processor architecture.

Thanks for the reply. What would be different in the managed code besides perhaps call convention though? (and bug workarounds like unmanaged delegates)

Thanks for the reply. What would be different in the managed code besides perhaps call convention though? (and bug workarounds like unmanaged delegates)

NativeWindow is typedef to platform specific window handle. This is used to initialize ISwapChain
https://github.com/DiligentGraphics/DiligentCore/blob/master/Platforms/interface/NativeWindow.h

@Alan-FGR
If you really need a Linux version of the package, you can do the following:

@MikhailGorobets thank you so much for your support!

I'm actually not currently in need of of Linux support. I was just curious on what would prevent the bindings from being cross platform as tbh that's the reason I'm considering it.

From what you said it doesn't sound too hard. Later today I'll see if I can get it to work on Wasm and maybe bflat as well.

Does SharpGenTools not generate a C layer on top of the C++ code?

Also, do you plan to support DiligentFX? I was thinking of using that native "model" type and cal the more higher level stuff.

@Alan-FGR
The code generated by SharpGenTools uses a pointer to the vtable of the corresponding COM object, and by offset, we invoke the corresponding method. It does not generate any additional unmanaged code for interop.
DiligentFX currently does not have a COM interface, so it is not possible to create C# bindings for it at the moment.