예제 #1
0
        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
        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
        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
        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;
        }