DiligentGraphics / DiligentEngine

A modern cross-platform low-level graphics library and rendering framework
http://diligentgraphics.com/diligent-engine/
Apache License 2.0
3.63k stars 331 forks source link

NuGet package has only windows runtimes #295

Open zarnayp opened 5 months ago

zarnayp commented 5 months ago

I have tried to run dotnet app in linux Ubuntu 24.04 using NuGet package DiligentGraphics.DiligentEngine.Core. It failes to load GraphicsEngineVk. When looking into NuGet package I see only runtimes for windows. Is there any plan to add Linux runtimes?

TheMostDiligent commented 5 months ago

At the moment we do not have plans to add Linux runtimes as this requires significant effort.

Arktische commented 4 months ago

@zarnayp Maybe we can generate .NET bindings automatically by using Mono project CppSharp . Many other .NET native graphics API binding project such as Silk.NET etc. are using it.

TheMostDiligent commented 4 months ago

@MikhailGorobets

MikhailGorobets commented 4 months ago

@Arktische SharpGenTools more efficient method calls on virtual methods of native instances (calli instruction vs. Marshal.GetDelegateForFunctionPointer) Not everything uses CppSharp. For example, Veldrid uses Vortice.Windows, which internally relies on SharpGenTools. Moreover, I think we have a simpler C# interface. We've hidden raw pointers You can compare with Slik.NET: https://github.com/dotnet/Silk.NET/blob/main/examples/CSharp/Direct3D11%20Tutorials/Tutorial%201.3%20-%20Textures/Program.cs https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial03_Texturing-DotNet/src/Tutorial03_Texturing.cs

zarnayp commented 4 months ago

First I will try to generate NuGet with Diligent-SharpGen. I have already tried with modified project file and mapping file as suggested here https://github.com/DiligentGraphics/DiligentCore/issues/424, but looks like I need to modify python script also.