From ac68af87304d65f5b2e9284439207d35d0fa1b91 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Mon, 24 Mar 2008 13:27:18 +0000 Subject: [PATCH] Do not call opengl functions when in Visual Studio designer. --- Source/Examples/WinForms/DerivedGLControl.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Examples/WinForms/DerivedGLControl.cs b/Source/Examples/WinForms/DerivedGLControl.cs index 5bcd33e1..3f11e1da 100644 --- a/Source/Examples/WinForms/DerivedGLControl.cs +++ b/Source/Examples/WinForms/DerivedGLControl.cs @@ -22,8 +22,12 @@ namespace Examples.WinForms set { clearColor = value; - MakeCurrent(); - GL.ClearColor(clearColor); + + if (!this.DesignMode) + { + MakeCurrent(); + GL.ClearColor(clearColor); + } } }