From fcfe9c2189fbbb00b0901b246e401b0f05413c7f Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Fri, 21 Aug 2015 16:14:59 +0200 Subject: [PATCH] Test stack example --- Tests/GOLIBTest_stack.cs | 55 ++++++++++++++++++++++++++++++++ Tests/Interfaces/test_stack.goml | 17 ++++++++++ Tests/Tests.csproj | 4 +++ 3 files changed, 76 insertions(+) create mode 100644 Tests/GOLIBTest_stack.cs create mode 100755 Tests/Interfaces/test_stack.goml 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 -- 2.47.3