Fixed documentation on the event args for the Resize event.

Ensure that we call the base method when we override an On* method.
This commit is contained in:
the_fiddler 2009-10-14 18:25:51 +00:00
parent 72cb52941e
commit d99fb773f5

View file

@ -23,6 +23,8 @@ namespace StarterKit
/// <param name="e">Not used.</param>
public override void OnLoad(EventArgs e)
{
base.OnLoad(e);
GL.ClearColor(System.Drawing.Color.MidnightBlue);
GL.Enable(EnableCap.DepthTest);
}
@ -32,9 +34,11 @@ namespace StarterKit
/// a good place to set up your projection matrix (which probably changes
/// along when the aspect ratio of your window).
/// </summary>
/// <param name="e">Contains information on the new Width and Size of the GameWindow.</param>
/// <param name="e">Not used.</param>
protected override void OnResize(EventArgs e)
{
base.OnResize(e);
GL.Viewport(ClientRectangle);
Matrix4 projection = Matrix4.CreatePerspectiveFieldOfView((float)Math.PI / 4, Width / (float)Height, 1.0f, 64.0f);
@ -48,6 +52,8 @@ namespace StarterKit
/// <param name="e">Contains timing information for framerate independent logic.</param>
protected override void OnUpdateFrame(FrameEventArgs e)
{
base.OnUpdateFrame(e);
if (Keyboard[Key.Escape])
Exit();
}
@ -58,6 +64,8 @@ namespace StarterKit
/// <param name="e">Contains timing information.</param>
protected override void OnRenderFrame(FrameEventArgs e)
{
base.OnRenderFrame(e);
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
Matrix4 modelview = Matrix4.LookAt(Vector3.Zero, Vector3.UnitZ, Vector3.UnitY);