public static SwappableNativeWindowBase CreateOpenGLWindow(FramebufferFormat format, int x, int y, int width, int height) { if (OperatingSystem.IsLinux()) { // TODO: detect X11/Wayland/DRI return(X11Helper.CreateGLXWindow(new NativeHandle(X11.X11.DefaultDisplay), format, x, y, width, height)); } else if (OperatingSystem.IsWindows()) { // TODO pass format return(Win32Helper.CreateWindowForWGL(x, y, width, height)); } throw new NotImplementedException(); }
public static NativeWindowBase CreateWindow(FramebufferFormat format, int x, int y, int width, int height) { if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { // TODO: detect X11/Wayland/DRI return(X11Helper.CreateGLXWindow(new NativeHandle(X11.X11.DefaultDisplay), format, x, y, width, height)); } if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { // TODO pass format return(Win32Helper.CreateWindowForWGL(x, y, width, height)); } throw new NotImplementedException(); }