Exemple #1
0
        private BallisticDemo(IntPtr hInstance)
            : base(hInstance) {
            _currentShotType = ShotType.Laser;

            MainWindowCaption = "Ballistic Demo";

            _lastMousePos = new Point();

            _camera = new FpsCamera();
            _camera.LookAt(new Vector3(10, 2, -10), new Vector3(0, 1, 0), Vector3.UnitY);

            _dirLights = new[] {
                new DirectionalLight {
                    Ambient = new Color4( 0.2f, 0.2f, 0.2f),
                    Diffuse = new Color4(0.7f, 0.7f, 0.7f),
                    Specular = new Color4(0.8f, 0.8f, 0.8f),
                    Direction = new Vector3(-0.57735f, -0.57735f, 0.57735f)
                },
                new DirectionalLight {
                    Ambient = new Color4(0,0,0),
                    Diffuse = new Color4(1.0f, 0.4f, 0.4f, 0.4f),
                    Specular = new Color4(1.0f, 0.2f, 0.2f, 0.2f),
                    Direction = new Vector3(-0.707f, -0.707f, 0)
                },
                new DirectionalLight {
                    Ambient = new Color4(0,0,0),
                    Diffuse = new Color4(1.0f,0.2f, 0.2f, 0.2f),
                    Specular = new Color4(0.2f,0.2f,0.2f),
                    Direction = new Vector3(0, 0, -1)
                }
            };
        }
Exemple #2
0
        private PointLightDemo(IntPtr hInstance) : base(hInstance) {
            MainWindowCaption = "Point Light Demo";
            _lastMousePos = new Point();
            Enable4XMsaa = true;
            GammaCorrectedBackBuffer = true;

            _camera = new FpsCamera();
            _camera.LookAt(new Vector3(71, 41, 71), Vector3.Zero, Vector3.UnitY);

            _dirLightDirection.Normalize();
        }