예제 #1
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);
        }
예제 #2
0
 public GLApplication(string title, Rectangle windowFrame, bool doubleBuffer)
 {
     fWindowFrame = windowFrame;
     fView = new GLView(title, doubleBuffer);
 }