From 2cbf60bb6f5ae339a782446c91c4d92b9361cb6b Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Mon, 9 Nov 2009 17:34:24 +0000 Subject: [PATCH] * ImmediateMode.cs: Added missing calls to base.On* events. Removed tabs. --- Source/Examples/OpenGL/1.1/ImmediateMode.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/Examples/OpenGL/1.1/ImmediateMode.cs b/Source/Examples/OpenGL/1.1/ImmediateMode.cs index 4f46df18..dc65a70d 100644 --- a/Source/Examples/OpenGL/1.1/ImmediateMode.cs +++ b/Source/Examples/OpenGL/1.1/ImmediateMode.cs @@ -1,4 +1,4 @@ -#region --- License --- +#region --- License --- /* Licensed under the MIT/X11 license. * Copyright (c) 2006-2008 the OpenTK Team. * This notice may not be removed from any source distribution. @@ -41,7 +41,7 @@ namespace Examples.Tutorial { } #endregion - + #region OnLoad protected override void OnLoad(EventArgs e) @@ -65,6 +65,8 @@ namespace Examples.Tutorial /// protected override void OnResize(EventArgs e) { + base.OnResize(e); + GL.Viewport(0, 0, Width, Height); double aspect_ratio = Width / (double)Height; @@ -87,6 +89,8 @@ namespace Examples.Tutorial /// protected override void OnUpdateFrame(FrameEventArgs e) { + base.OnUpdateFrame(e); + if (Keyboard[OpenTK.Input.Key.Escape]) { this.Exit(); @@ -103,6 +107,8 @@ namespace Examples.Tutorial /// protected override void OnRenderFrame(FrameEventArgs e) { + base.OnRenderFrame(e); + GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); Matrix4 lookat = Matrix4.LookAt(0, 5, 5, 0, 0, 0, 0, 1, 0);