mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 16:15:28 +00:00
glControl1_Resize event was not fired.
This commit is contained in:
parent
b81fdbe630
commit
9725f72fb9
|
@ -78,6 +78,7 @@
|
||||||
this.glControl1.Size = new System.Drawing.Size(629, 565);
|
this.glControl1.Size = new System.Drawing.Size(629, 565);
|
||||||
this.glControl1.TabIndex = 0;
|
this.glControl1.TabIndex = 0;
|
||||||
this.glControl1.VSync = false;
|
this.glControl1.VSync = false;
|
||||||
|
this.glControl1.Resize += new System.EventHandler(this.glControl1_Resize);
|
||||||
this.glControl1.Paint += new System.Windows.Forms.PaintEventHandler(this.glControl1_Paint);
|
this.glControl1.Paint += new System.Windows.Forms.PaintEventHandler(this.glControl1_Paint);
|
||||||
this.glControl1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.glControl1_KeyDown);
|
this.glControl1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.glControl1_KeyDown);
|
||||||
//
|
//
|
||||||
|
|
|
@ -45,6 +45,7 @@ namespace Examples.WinForms
|
||||||
{
|
{
|
||||||
base.OnLoad(e);
|
base.OnLoad(e);
|
||||||
|
|
||||||
|
glControl1_Resize(this, EventArgs.Empty); // Ensure the Viewport is set up correctly
|
||||||
GL.ClearColor(Color.Crimson);
|
GL.ClearColor(Color.Crimson);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +73,7 @@ namespace Examples.WinForms
|
||||||
glControl1.SwapBuffers();
|
glControl1.SwapBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void glControl1_Resize(object sender, OpenTK.Platform.ResizeEventArgs e)
|
private void glControl1_Resize(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (glControl1.ClientSize.Height == 0)
|
if (glControl1.ClientSize.Height == 0)
|
||||||
glControl1.ClientSize = new System.Drawing.Size(glControl1.ClientSize.Width, 1);
|
glControl1.ClientSize = new System.Drawing.Size(glControl1.ClientSize.Width, 1);
|
||||||
|
|
Loading…
Reference in a new issue