W03_Extensions now uses the Application.Idle event to load extensions instead of the OnLoad event. Fixes flickering problems.

This commit is contained in:
the_fiddler 2007-09-24 19:57:37 +00:00
parent 8cfee01131
commit edbdadf34b

View file

@ -37,11 +37,13 @@ namespace Examples.WinForms
glClass = assembly.GetType("OpenTK.OpenGL.GL"); glClass = assembly.GetType("OpenTK.OpenGL.GL");
delegatesClass = glClass.GetNestedType("Delegates", BindingFlags.Static | BindingFlags.NonPublic); delegatesClass = glClass.GetNestedType("Delegates", BindingFlags.Static | BindingFlags.NonPublic);
importsClass = glClass.GetNestedType("Imports", BindingFlags.Static | BindingFlags.NonPublic); importsClass = glClass.GetNestedType("Imports", BindingFlags.Static | BindingFlags.NonPublic);
Application.Idle += StartAsync;
} }
protected override void OnLoad(EventArgs e) void StartAsync(object sender, EventArgs e)
{ {
base.OnLoad(e); Application.Idle -= StartAsync;
glControl.CreateContext(); glControl.CreateContext();