示例#1
0
        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();
        }
示例#2
0
        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();
        }