Ejemplo n.º 1
0
 public GLWindow(string title, int x, int y, int width, int height, GLController controller)
     : base(title, x, y, width, height)
 {
     fController = controller;
     fController.WindowHandle = Handle;
     fController.OnCreate();
 }
Ejemplo n.º 2
0
        public int Run(GLModel aModel)
        {
            fModel = aModel;
            // create "controller" component by specifying what are "model" and "view"
            fController = new GLController(aModel, fView);

            // create window with given controller
            fWindow = new GLWindow(fView.Title, fWindowFrame, fController);
            fWindow.Show();

            return RunLoop();
        }
Ejemplo n.º 3
0
        static void Main()
        {
            // instantiate model and view components, so "controller" component can reference them
            PixelDisplayModel model = new PixelDisplayModel();
            GLView view = new GLView("GL Pixel Viewer", true);

            // create "controller" component by specifying what are "model" and "view"
            GLController glCtrl = new GLController(model, view);

            // create window with given controller
            GLWindow glWin = new GLWindow("GL Pixel Viewer", new Rectangle(10, 10, 640, 480), glCtrl);
            //glWin.WindowClass.ClassStyle = User32.CS_HREDRAW | User32.CS_VREDRAW | User32.CS_OWNDC;
            //glWin.CreateWindow();
            glWin.Show();

            // main message loop
            int exitCode;
            exitCode = mainMessageLoop(IntPtr.Zero);
        }
Ejemplo n.º 4
0
 public GLWindow(string title, Rectangle frame, GLController controller)
     :this(title, frame.X, frame.Y, frame.Width, frame.Height, controller)
 {
 }