From 3badc623d26d559903d29102693ea37eacc6dcf1 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 11 Nov 2007 19:28:43 +0000 Subject: [PATCH] X11GLContext plays better with Windows.Forms. --- Source/OpenTK/GLControl.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Source/OpenTK/GLControl.cs b/Source/OpenTK/GLControl.cs index 174e4eb9..743a15f1 100644 --- a/Source/OpenTK/GLControl.cs +++ b/Source/OpenTK/GLControl.cs @@ -27,11 +27,18 @@ namespace OpenTK #region --- Constructor --- + /// + /// Constructs a new GLControl. + /// public GLControl() : this(null) { } + /// + /// Constructs a new GLControl with the specified DisplayMode. + /// + /// public GLControl(DisplayMode mode) { InitializeComponent(); @@ -232,11 +239,11 @@ namespace OpenTK { OpenTK.Platform.Windows.MSG msg = new OpenTK.Platform.Windows.MSG(); object get_lock = new object(); - IntPtr handle; + //IntPtr handle; - public WinPlatformIdle(IWindowInfo info) + public WinPlatformIdle(WindowInfo info) { - handle = info.Handle; + //handle = info.Handle; } #region IPlatformIdle Members @@ -260,9 +267,9 @@ namespace OpenTK object get_lock = new object(); IntPtr display; - public X11PlatformIdle(IWindowInfo info) + public X11PlatformIdle(WindowInfo info) { - display = (info as OpenTK.Platform.X11.WindowInfo).Display; + display = ((OpenTK.Platform.X11.WindowInfo)info).Display; } #region IPlatformIdle Members @@ -285,7 +292,7 @@ namespace OpenTK { IPlatformIdle implementation; - public PlatformIdle(IWindowInfo info) + public PlatformIdle(WindowInfo info) { switch (System.Environment.OSVersion.Platform) {