From: jpbruyere Date: Fri, 21 Aug 2015 14:14:59 +0000 (+0200) Subject: Test stack example X-Git-Tag: 0.2~67 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=fcfe9c2189fbbb00b0901b246e401b0f05413c7f;p=jp%2Fcrow.git Test stack example --- diff --git a/Tests/GOLIBTest_stack.cs b/Tests/GOLIBTest_stack.cs new file mode 100644 index 00000000..2164c721 --- /dev/null +++ b/Tests/GOLIBTest_stack.cs @@ -0,0 +1,55 @@ +#define MONO_CAIRO_DEBUG_DISPOSE + + +using System; +using System.Runtime.InteropServices; +using OpenTK; +using OpenTK.Graphics.OpenGL; +using OpenTK.Input; + +using System.Diagnostics; + +//using GGL; +using go; +using System.Threading; + + +namespace test +{ + class GOLIBTest_stack : OpenTKGameWindow + { + public GOLIBTest_stack () + : base(1024, 600,"test") + {} + + VerticalStack g; + + protected override void OnLoad (EventArgs e) + { + base.OnLoad (e); + LoadInterface("Interfaces/test_stack.goml", out g); + + } + protected override void OnRenderFrame (FrameEventArgs e) + { + GL.Clear (ClearBufferMask.ColorBufferBit); + base.OnRenderFrame (e); + SwapBuffers (); + } + + protected override void OnUpdateFrame (FrameEventArgs e) + { + base.OnUpdateFrame (e); + } + + [STAThread] + static void Main () + { + Console.WriteLine ("starting example"); + + using (GOLIBTest_stack win = new GOLIBTest_stack( )) { + win.Run (30.0); + } + } + } +} \ No newline at end of file diff --git a/Tests/Interfaces/test_stack.goml b/Tests/Interfaces/test_stack.goml new file mode 100755 index 00000000..a1b4b4e0 --- /dev/null +++ b/Tests/Interfaces/test_stack.goml @@ -0,0 +1,17 @@ + + + diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 8fa16474..6e2973a4 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -63,6 +63,7 @@ + @@ -134,6 +135,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest