Пример #1
0
        private MyApplication()
        {
            var mode = new GraphicsMode(new ColorFormat(32), 24, 8, 0);
            gameWindow = new GameWindow(700, 700, mode, "Example", GameWindowFlags.Default, DisplayDevice.Default, 4, 3, GraphicsContextFlags.ForwardCompatible);

            gameWindow.WindowState = WindowState.Fullscreen;
            gameWindow.MouseMove += GameWindow_MouseMove;
            gameWindow.MouseWheel += GameWindow_MouseWheel;
            gameWindow.KeyDown += (s, arg) => gameWindow.Close();
            gameWindow.Resize += (s, arg) => GL.Viewport(0, 0, gameWindow.Width, gameWindow.Height);
            gameWindow.UpdateFrame += GameWindow_UpdateFrame;
            gameWindow.RenderFrame += GameWindow_RenderFrame;
            gameWindow.RenderFrame += (s, arg) => gameWindow.SwapBuffers();
            model = new Model();
            visual = new MainVisual();
        }