Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dot NET tasks #424

Open
3 of 4 tasks
TheMostDiligent opened this issue Jul 29, 2023 · 9 comments
Open
3 of 4 tasks

Dot NET tasks #424

TheMostDiligent opened this issue Jul 29, 2023 · 9 comments
Assignees

Comments

@TheMostDiligent
Copy link
Contributor

TheMostDiligent commented Jul 29, 2023

  • 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
@rbnpontes
Copy link

Will Diligent .NET support binaries to Linux ?

@MikhailGorobets
Copy link
Contributor

MikhailGorobets commented Sep 28, 2023

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

@Alan-FGR
Copy link

Alan-FGR commented Nov 4, 2023

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

@MikhailGorobets
Copy link
Contributor

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.

@Alan-FGR
Copy link

Alan-FGR commented Nov 4, 2023

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

@MikhailGorobets
Copy link
Contributor

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

@MikhailGorobets
Copy link
Contributor

MikhailGorobets commented Nov 4, 2023

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

@Alan-FGR
Copy link

Alan-FGR commented Nov 4, 2023

@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.

@MikhailGorobets
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants