Replaced in-class initialization with calls to platform-specific classes.

This commit is contained in:
Jarl Gullberg 2017-06-13 22:01:11 +02:00
parent e05f34377b
commit cf678dfc48
No known key found for this signature in database
GPG key ID: 750FF6F6BDA72D23

View file

@ -36,6 +36,9 @@ using OpenTK.Graphics;
using OpenTK.Platform;
using Gtk;
using OpenTK.OSX;
using OpenTK.Win;
using OpenTK.X11;
namespace OpenTK
{
@ -296,11 +299,11 @@ namespace OpenTK
// IWindowInfo
if (Configuration.RunningOnWindows)
_WindowInfo = InitializeWindows();
_WindowInfo = WinWindowsInfoInitializer.Initialize(this.Window.Handle);
else if (Configuration.RunningOnMacOS)
_WindowInfo = InitializeOSX();
_WindowInfo = OSXWindowInfoInitializer.Initialize(this.Window.Handle);
else
_WindowInfo = InitializeX(graphicsMode);
_WindowInfo = XWindowInfoInitializer.Initialize(graphicsMode, this.Display.Handle, this.Screen.Number, this.Window.Handle, this.RootWindow.Handle);
// GraphicsContext
_GraphicsContext = new GraphicsContext(graphicsMode, _WindowInfo, GlVersionMajor, GlVersionMinor, _GraphicsContextFlags);