Deleted obsolete tests.

This commit is contained in:
the_fiddler 2007-10-17 21:14:36 +00:00
parent ac515347d0
commit 765cff1142
2 changed files with 0 additions and 163 deletions

View file

@ -1,96 +0,0 @@
#region --- License ---
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
* See license.txt for license info
*/
#endregion
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Runtime.Serialization;
using System.IO;
using System.Diagnostics;
using OpenTK;
using OpenTK.OpenGL;
namespace Examples.Tests
{
public class S02_RawInput_Logger : GameWindow//, IExample
{
#region IExample Members
public void Launch()
{
try
{
Run();
}
catch (Exception expt)
{
System.Diagnostics.Debug.WriteLine(
String.Format(
"Exception: {3}{0}Stacktrace:{0}{1}{0}{0}{2}",
System.Environment.NewLine,
expt.TargetSite,
expt.StackTrace,
expt.Message
)
);
/*MessageBox.Show(
String.Format(
"Stacktrace:{0}{1}{0}{0}{2}",
System.Environment.NewLine,
expt.TargetSite,
expt.StackTrace
),
expt.Message
);*/
throw;
}
Debug.Flush();
Debug.Close();
}
#endregion
public S02_RawInput_Logger()
{
this.CreateWindow(new DisplayMode(100, 100));
Keyboard.KeyDown += new OpenTK.Input.KeyDownEvent(LogKeyDown);
Keyboard.KeyUp += new OpenTK.Input.KeyUpEvent(LogKeyUp);
}
void LogKeyDown(object sender, OpenTK.Input.Key key)
{
Trace.WriteLine(String.Format("OpenTK key {0} pressed on Keyboard: ({1}).",
key, sender as OpenTK.Input.KeyboardDevice));
}
void LogKeyUp(object sender, OpenTK.Input.Key key)
{
Trace.WriteLine(String.Format("OpenTK key {0} released on Keyboard: ({1}).",
key, sender as OpenTK.Input.KeyboardDevice));
}
public override void OnLoad(EventArgs e)
{
base.OnLoad(e);
GL.ClearColor(0.0f, 0.0f, 0.0f, 0.0f);
}
public override void OnRenderFrame(RenderFrameEventArgs e)
{
base.OnRenderFrame(e);
GL.Clear(GL.Enums.ClearBufferMask.COLOR_BUFFER_BIT);
Context.SwapBuffers();
Thread.Sleep(1);
}
}
}

View file

@ -1,67 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using OpenTK;
using OpenTK.OpenGL;
namespace Examples.Tests
{
public class S03_Stack_Imbalance : GameWindow//, IExample
{
public S03_Stack_Imbalance()
{
this.CreateWindow(new DisplayMode(800, 600));
}
#region IExample Members
public void Launch()
{
this.Run();
}
#endregion
protected override void OnResize(OpenTK.Platform.ResizeEventArgs e)
{
GL.Ortho(-1.0, 1.0, -1.0, 1.0, 1.0, 32.0);
base.OnResize(e);
}
float[] proj = new float[16];
public override void OnRenderFrame(RenderFrameEventArgs e)
{
GL.Clear(GL.Enums.ClearBufferMask.COLOR_BUFFER_BIT);
GL.GetFloat(GL.Enums.GetPName.PROJECTION_MATRIX, proj);
float sum = 0.0f;
for (int i = 0; i < 16; i++)
{
sum += proj[i];
}
if (sum == 0)
{
throw new Exception("GetFloat did not return anything!");
}
GL.Begin(GL.Enums.BeginMode.TRIANGLES);
GL.Color3(System.Drawing.Color.Chartreuse);
GL.Vertex3(-1.0, -1.0, 2.0);
GL.Color3(System.Drawing.Color.Crimson);
GL.Vertex3( 1.0, -1.0, 2.0);
GL.Color3(System.Drawing.Color.DarkGoldenrod);
GL.Vertex3( 0.0, 1.0, 2.0);
GL.End();
Context.SwapBuffers();
base.OnRenderFrame(e);
}
}
}