Do not call opengl functions when in Visual Studio designer.

This commit is contained in:
the_fiddler 2008-03-24 13:27:18 +00:00
parent be13869712
commit ac68af8730

View file

@ -22,10 +22,14 @@ namespace Examples.WinForms
set set
{ {
clearColor = value; clearColor = value;
if (!this.DesignMode)
{
MakeCurrent(); MakeCurrent();
GL.ClearColor(clearColor); GL.ClearColor(clearColor);
} }
} }
}
protected override void OnPaint(PaintEventArgs e) protected override void OnPaint(PaintEventArgs e)
{ {