Esempio n. 1
0
        public GameWindow()
            : base(800, 600, GraphicsMode.Default, "")
        {
            _updateTimeSamples = new double[60];
            for (var i = _updateTimeSamples.Length - 1; i >= 0; i--) {
                _updateTimeSamples[i] = TargetUpdatePeriod;
            }
            // disable vsync
            VSync = VSyncMode.On;

            // set up camera
            Camera = new Camera();
            Camera.SetBehavior(new NullCameraBehaviour());
            Camera.ResetToDefault();
            Camera.Enable(this);
            ResetMatrices();
            // hook up events
            Load += OnLoad;
            Unload += OnUnload;
            RenderFrame += OnRenderFrame;
        }