コード例 #1
0
ファイル: Lesson04.cs プロジェクト: mono/gtkglarea-sharp
        public static int Main(string[] argc)
        {
            Application.Init ();

            GtkGL.GladeExample gladeWindow = new GtkGL.GladeExample();

               		// Create a new Triangle object, translate it a bit and add it to our gl window
            triangle = new GtkGL.ColoredTriangle();
            triangle.Translate(-1.5,0.0,-3);
            gladeWindow.glw.AddGLObject( triangle );

            // Create a new Square object, translate it a bit and add it to our gl window
            square = new GtkGL.ColoredSquare();
            square.Translate(1.5,0.0,-3);
            gladeWindow.glw.AddGLObject( square );

            // Show GL Window
            // Is this a bug?  Shouldn't ShowAll do what these two commands do?
            // gladeWindow.glwidget.ShowAll();
            gladeWindow.glwidget.Show();
            gladeWindow.glw.Show();

            // Rotate (and draw) our objects once evry 50 ms
            GLib.Timeout.Add (50, new GLib.TimeoutHandler (NeHe.Lesson04.RotateObjects));

            Application.Run ();

            return 0;
        }
コード例 #2
0
ファイル: Lesson02.cs プロジェクト: mono/gtkglarea-sharp
        public static int Main(string[] argc)
        {
            Application.Init ();

            GtkGL.GladeExample gladeWindow = new GtkGL.GladeExample();

               		// Create a new Triangle object, translate it a bit and add it to our gl window
            Triangle triangle = new Triangle();
            triangle.Translate(-1.5,0.0,-3);
            gladeWindow.glw.AddGLObject( triangle );

            // Create a new Square object, translate it a bit and add it to our gl window
            Square square = new Square();
            square.Translate(1.5,0.0,-3);
            gladeWindow.glw.AddGLObject( square );

            // Show GL Window
            // Is this a bug?  Shouldn't ShowAll do what these two commands do?
            // gladeWindow.glwidget.ShowAll();
            gladeWindow.glwidget.Show();
            gladeWindow.glw.Show();

            Application.Run ();

            return 0;
        }
コード例 #3
0
ファイル: Lesson01.cs プロジェクト: mono/gtkglarea-sharp
        public static int Main(string[] args)
        {
            Gtk.Application.Init ();

            GtkGL.GladeExample gladeWindow = new GtkGL.GladeExample ();

            // Show GL Window
            // Is this a bug?  Shouldn't ShowAll do what these two commands do?
            // gladeWindow.glwidget.ShowAll();
            gladeWindow.glwidget.Show();
            gladeWindow.glw.Show();

            Gtk.Application.Run ();

            return 0;
        }
コード例 #4
0
ファイル: Engine.cs プロジェクト: mono/gtkglarea-sharp
        public static int Main(string[] args)
        {
            MdlLoader loader = new MdlLoader();
            Mdl myMdl = loader.Load("/home/cjcollier/id/models/armor.mdl");

            Gtk.Application.Init ();

            GtkGL.GladeExample ge = new GtkGL.GladeExample ();

            // Show the GL widget window
            ge.window.Show();
            ge.glw.Show();

            Gtk.Application.Run ();

            return 0;
        }