Skip to content

Problem with System.PlatformNotSupportedException #511

Answered by HurricanKai
DeafMan1983 asked this question in Q&A
Discussion options

You must be logged in to vote

Hallo 👋
This exception suggests we can't find GLFW or it doesn't work on your platform, make sure that you have a valid glfw binary next in the working directory.

Also, a couple of suggestions:

  • while I'd expect your code to work, I'd suggest using the provided abstraction that you already have, no P/Invoke necessary (on your side).
if (glfw_win.Native.X11.HasValue)
{
    var (displayHandle, windowHandle) = glfw_win.Native.X11.Value;
    // your X11 code here
}
  • you probably shouldn't re-create the GL object on every render call, it's not cached.
    And to answer that last question, it's very unlikely you ever need to touch NativeApi yourself.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@DeafMan1983
Comment options

Answer selected by HurricanKai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #510 on June 08, 2021 06:39.