W03_Extensions now uses the Application.Idle event to load extensions instead of the OnLoad event. Fixes flickering problems.
This commit is contained in:
parent
4af4ca65c4
commit
c204763f3a
1 changed files with 4 additions and 2 deletions
|
@ -37,11 +37,13 @@ namespace Examples.WinForms
|
|||
glClass = assembly.GetType("OpenTK.OpenGL.GL");
|
||||
delegatesClass = glClass.GetNestedType("Delegates", 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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue