Updated update and render frequencies for all examples.

This commit is contained in:
the_fiddler 2007-09-23 12:49:38 +00:00
parent ceb5f4dfd8
commit dfe1d7c335
6 changed files with 44 additions and 44 deletions

View file

@ -77,7 +77,7 @@ namespace Examples.Tutorial
public void Launch() public void Launch()
{ {
this.Run(); this.Run(1.0, 5.0);
} }
#endregion #endregion

View file

@ -99,16 +99,9 @@ namespace Examples.Tutorial
Fullscreen = !Fullscreen; Fullscreen = !Fullscreen;
} }
GL.MatrixMode(GL.Enums.MatrixMode.MODELVIEW); angle += 3.0f;
GL.LoadIdentity(); if (angle > 720.0f)
Glu.LookAt( angle -= 720.0f;
0.0, 5.0, 5.0,
0.0, 0.0, 0.0,
0.0, 1.0, 0.0
);
GL.Rotate(angle, 0.0f, 1.0f, 0.0f);
angle += 0.5f;
} }
#endregion #endregion
@ -122,6 +115,15 @@ namespace Examples.Tutorial
{ {
GL.Clear(GL.Enums.ClearBufferMask.COLOR_BUFFER_BIT | GL.Enums.ClearBufferMask.DEPTH_BUFFER_BIT); GL.Clear(GL.Enums.ClearBufferMask.COLOR_BUFFER_BIT | GL.Enums.ClearBufferMask.DEPTH_BUFFER_BIT);
GL.MatrixMode(GL.Enums.MatrixMode.MODELVIEW);
GL.LoadIdentity();
Glu.LookAt(
0.0, 5.0, 5.0,
0.0, 0.0, 0.0,
0.0, 1.0, 0.0
);
GL.Rotate(angle, 0.0f, 1.0f, 0.0f);
DrawCube(); DrawCube();
Context.SwapBuffers(); Context.SwapBuffers();
@ -188,7 +190,7 @@ namespace Examples.Tutorial
/// </remarks> /// </remarks>
public void Launch() public void Launch()
{ {
Run(); Run(60.0, 60.0);
} }
#endregion #endregion

View file

@ -31,7 +31,7 @@ namespace Examples.Tutorial
public void Launch() public void Launch()
{ {
this.Run(); this.Run(60.0, 60.0);
} }
#endregion #endregion

View file

@ -81,21 +81,6 @@ namespace Examples.Tutorial
#endregion #endregion
#region public void Launch()
/// <summary>
/// Launches this example.
/// </summary>
/// <remarks>
/// Provides a simple way for the example launcher to launch the examples.
/// </remarks>
public void Launch()
{
Run();
}
#endregion
#region --- Event Handlers --- #region --- Event Handlers ---
#region OnResize #region OnResize
@ -165,5 +150,20 @@ namespace Examples.Tutorial
#endregion #endregion
#endregion --- Event Handlers --- #endregion --- Event Handlers ---
#region public void Launch()
/// <summary>
/// Launches this example.
/// </summary>
/// <remarks>
/// Provides a simple way for the example launcher to launch the examples.
/// </remarks>
public void Launch()
{
this.Run(1.0, 5.0);
}
#endregion
} }
} }

View file

@ -239,11 +239,7 @@ namespace Examples.Tutorial
/// </remarks> /// </remarks>
public void Launch() public void Launch()
{ {
//using (T08_VBO ex = new T08_VBO()) Run(60.0, 60.0);
{
//ex.Run();
Run();
}
} }
#endregion #endregion

View file

@ -157,15 +157,9 @@ namespace Examples.Tutorial
this.Exit(); this.Exit();
} }
GL.MatrixMode(GL.Enums.MatrixMode.MODELVIEW); angle += 3.0f;
GL.LoadIdentity(); if (angle > 720.0f)
Glu.LookAt( angle -= 720.0f;
0.0, 5.0, 5.0,
0.0, 0.0, 0.0,
0.0, 1.0, 0.0
);
GL.Rotate(angle, 0.0f, 1.0f, 0.0f);
angle += 0.05f;
} }
#endregion #endregion
@ -178,10 +172,18 @@ namespace Examples.Tutorial
GL.Clear(GL.Enums.ClearBufferMask.COLOR_BUFFER_BIT | GL.Enums.ClearBufferMask.DEPTH_BUFFER_BIT); GL.Clear(GL.Enums.ClearBufferMask.COLOR_BUFFER_BIT | GL.Enums.ClearBufferMask.DEPTH_BUFFER_BIT);
GL.MatrixMode(GL.Enums.MatrixMode.MODELVIEW);
GL.LoadIdentity();
Glu.LookAt(
0.0, 5.0, 5.0,
0.0, 0.0, 0.0,
0.0, 1.0, 0.0
);
GL.Rotate(angle, 0.0f, 1.0f, 0.0f);
DrawCube(); DrawCube();
Context.SwapBuffers(); Context.SwapBuffers();
Thread.Sleep(0);
} }
#endregion #endregion
@ -244,7 +246,7 @@ namespace Examples.Tutorial
/// </remarks> /// </remarks>
public void Launch() public void Launch()
{ {
Run(); Run(60.0, 60.0);
} }
#endregion #endregion