From 56610f5b20f4275304ef9a014cb55f2dc111d1d3 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Thu, 15 Oct 2009 14:52:57 +0000 Subject: [PATCH] Added workaround for the "Resize event called before GraphicsContext is ready" issue. --- Source/GLControl/GLControl.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/GLControl/GLControl.cs b/Source/GLControl/GLControl.cs index bd3e635c..340b82f9 100644 --- a/Source/GLControl/GLControl.cs +++ b/Source/GLControl/GLControl.cs @@ -191,6 +191,9 @@ namespace OpenTK /// A System.EventArgs that contains the event data. protected override void OnResize(EventArgs e) { + if (IsHandleCreated == false) + CreateHandle(); + if (context != null) context.Update(Implementation.WindowInfo);