diff --git a/Source/Examples/Tutorial/T10_GLSL_Cube.cs b/Source/Examples/Tutorial/T10_GLSL_Cube.cs index a104c602..34f7593e 100644 --- a/Source/Examples/Tutorial/T10_GLSL_Cube.cs +++ b/Source/Examples/Tutorial/T10_GLSL_Cube.cs @@ -50,6 +50,7 @@ namespace Examples.Tutorial public T10_GLSL_Cube() { + this.CreateWindow(new OpenTK.Platform.DisplayMode(800, 600)); Context.MakeCurrent(); //Text = diff --git a/Source/Examples/WinForms/W01_First_Window.cs b/Source/Examples/WinForms/W01_First_Window.cs index a50cee13..1bbafb77 100644 --- a/Source/Examples/WinForms/W01_First_Window.cs +++ b/Source/Examples/WinForms/W01_First_Window.cs @@ -23,6 +23,7 @@ namespace Examples.WinForms { public partial class W01_First_Window : Form, IExample { + OpenTK.InputDevices input; public W01_First_Window() { InitializeComponent(); @@ -30,6 +31,13 @@ namespace Examples.WinForms this.ShowDialog(); } + protected override void OnHandleCreated(EventArgs e) + { + base.OnHandleCreated(e); + + input = new OpenTK.InputDevices(this.Handle); + } + private void redButton_Click(object sender, EventArgs e) { GL.ClearColor(0.7f, 0.0f, 0.0f, 0.0f); diff --git a/Source/OpenTK/GameWindow.cs b/Source/OpenTK/GameWindow.cs index 5f2676d1..582a1f19 100644 --- a/Source/OpenTK/GameWindow.cs +++ b/Source/OpenTK/GameWindow.cs @@ -175,6 +175,7 @@ namespace OpenTK { if (!glWindow.Created) { + Debug.WriteLine("WARNING: OpenGL Context accessed before creating a render window. This may indicate a programming error. Force-creating a render window."); mode = new DisplayMode(640, 480); this.CreateWindow(mode); }