dotnet / Silk.NET

The high-speed OpenGL, OpenCL, OpenAL, OpenXR, GLFW, SDL, Vulkan, Assimp, WebGPU, and DirectX bindings library your mother warned you about.
https://dotnet.github.io/Silk.NET
MIT License
4.12k stars 397 forks source link

Investigate getting Silk.NET to work atop CoreRT #284

Closed Perksey closed 4 years ago

Perksey commented 4 years ago

Commit 700c15cb adds a CoreRT test project to the 2.0 Silk.NET Lab.

Currently, CoreRT can't run Silk.NET projects due to the windowing system unable to resolve a platform. This could be for many reasons, as Silk.NET.Windowing uses a bit of reflection to resolve a platform as well as a custom dynamic loading system for our bindings. The current output is this:

Unhandled Exception: System.PlatformNotSupportedException: Couldn't find a suitable window platform. https://docs.ultz.co.uk/Silk.NET/windowing/troubleshooting.html
   at Silk.NET.Windowing.Window.Create(WindowOptions) + 0x8f
   at Tutorial.Program.Main(String[]) + 0xc6
   at CoreRTTest!<BaseAddress>+0x170d177
   at CoreRTTest!<BaseAddress>+0x170d200

At some point someone should investigate the cause of this issue as (in theory) everything should be working, the only part where it may be failing is the reflection.

That's all the insights I have to hand at the moment.

HurricanKai commented 4 years ago

Would love to investigate this, so assigned myself. I'm pretty sure this comes from the TryAdd to platforms, which attempts to load an assembly from a name (something like Silk.NET.Windowing.Glfw) this of course is unavailable on CoreRT

HurricanKai commented 4 years ago

Mostly resolved with #303. I'll keep a look out to make AOT support even better, but this should suffice.