Example #1
0
        private void KeyboardKeyDown(object sender, KeyboardKeyEventArgs e)
        {
            switch (e.Key)
            {
            case Key.Escape:
                Close();
                break;

            case Key.Keypad1:
                _lightning.Position = Vector4.Add(_lightning.Position,
                                                  new Vector4(0, 0, 0, _lightning.Position.W == 0f ? 1 : -1));
                break;

            case Key.Keypad2:
                _lightning.IsAttenuationEnabled = !_lightning.IsAttenuationEnabled;
                break;

            case Key.Keypad3:
                if (GL.IsEnabled(EnableCap.Fog))
                {
                    _fog.Disable();
                }
                else
                {
                    _fog.Enable();
                }
                break;
            }
        }