diff --git a/Source/GLControl/GLControl.cs b/Source/GLControl/GLControl.cs index f3a8541f..9e9619a9 100644 --- a/Source/GLControl/GLControl.cs +++ b/Source/GLControl/GLControl.cs @@ -92,6 +92,18 @@ namespace OpenTK { if (mode == null) throw new ArgumentNullException("mode"); + + // SDL does not currently support embedding + // on external windows. If Open.Toolkit is not yet + // initialized, we'll try to request a native backend + // that supports embedding. + // Most people are using GLControl through the + // WinForms designer in Visual Studio. This approach + // works perfectly in that case. + Toolkit.Init(new ToolkitOptions + { + Backend = PlatformBackend.PreferNative + }); SetStyle(ControlStyles.Opaque, true); SetStyle(ControlStyles.UserPaint, true);