diff --git a/Source/Examples/OpenAL/Test/TestAudioContext.cs b/Source/Examples/OpenAL/Test/TestAudioContext.cs index 5200bad8..4fc44aea 100644 --- a/Source/Examples/OpenAL/Test/TestAudioContext.cs +++ b/Source/Examples/OpenAL/Test/TestAudioContext.cs @@ -22,10 +22,7 @@ namespace Examples public static void PrintOpenALErrors( IntPtr device ) { ALError AlErr = AL.GetError(); - // AudioContext should throw on errors, so no need to test them manually. - //AlcError AlcErr = Alc.GetError(device); - AlutError AlutErr = Alut.GetError(); - Console.WriteLine("Al: " + AlErr + " Alut: " + Alut.GetErrorString(AlutErr)); + Console.WriteLine("OpenAL error: {0}", AlErr); } public static void Main() diff --git a/Source/Examples/OpenGL/1.1/DisplayLists.cs b/Source/Examples/OpenGL/1.1/DisplayLists.cs index 304941c1..196de4d7 100644 --- a/Source/Examples/OpenGL/1.1/DisplayLists.cs +++ b/Source/Examples/OpenGL/1.1/DisplayLists.cs @@ -97,14 +97,15 @@ namespace Examples.Tutorial protected override void OnResize(EventArgs e) { - GL.Viewport(0, 0, Width, Height); + GL.Viewport(ClientRectangle); - double ratio = 0.0; - ratio = this.Width / (double)this.Height; + float aspect = this.ClientSize.Width / (float)this.ClientSize.Height; + + Matrix4 projection_matrix; + Matrix4.CreatePerspectiveFieldOfView((float)Math.PI / 4, aspect, 1, 64, out projection_matrix); GL.MatrixMode(MatrixMode.Projection); - GL.LoadIdentity(); - Glu.Perspective(45.0, ratio, 1.0, 64.0); + GL.LoadMatrix(ref projection_matrix); } #endregion diff --git a/Source/Examples/OpenTK/GLControl/SimpleGLControl.Designer.cs b/Source/Examples/OpenTK/GLControl/SimpleGLControl.Designer.cs index e8e1e2ac..1b3ab67c 100644 --- a/Source/Examples/OpenTK/GLControl/SimpleGLControl.Designer.cs +++ b/Source/Examples/OpenTK/GLControl/SimpleGLControl.Designer.cs @@ -69,11 +69,9 @@ // // glControl1 // - this.glControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); + this.glControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.glControl1.BackColor = System.Drawing.SystemColors.ControlDarkDark; - this.glControl1.Location = new System.Drawing.Point(1, 0); + this.glControl1.Location = new System.Drawing.Point(0, 0); this.glControl1.Name = "glControl1"; this.glControl1.Size = new System.Drawing.Size(629, 565); this.glControl1.TabIndex = 0;