Replaced in-class initialization with calls to platform-specific classes.
This commit is contained in:
parent
e05f34377b
commit
cf678dfc48
1 changed files with 26 additions and 23 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue