示例#1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            _lastWindowState = WindowState;
            _app.Initialize();
            _app.RunAsync();

            var camera = _app.Camera;

            camera.Position = new Vector3(0, 5, -15);
            camera.LookAt(Vector3.Zero, Vector3.UnitY);

            var scene = new ShadowScene(_app, _app);

            scene.Initialize();
            scene.Name = "ShapesScene";
            _scene     = scene;
            _app.ChildComponents.Add(scene);
            var inputHandler = new InputHandler(_app, _app);

            inputHandler.Initialize();
            _app.ChildComponents.Add(inputHandler);

            scene.SetShadowEnabled(true);
            scene.SetReflectionEnabled(true);
            scene.SetMaterialType(MaterialType.Copper);
            scene.SetNumberOfLights(NumberOfLights.Three);
            scene.SetSkyboxType(SkyboxType.None);
            scene.SetShadowEnabled(false);

            mnuDisplayNormal.Checked   = true;
            mnuLights3.Checked         = true;
            mnuSkyboxDisabled.Checked  = true;
            mnuTextureCopper.Checked   = true;
            mnuSurfaceDisabled.Checked = true;
            mnuShadowDisabled.Checked  = true;
        }
示例#2
0
文件: Form1.cs 项目: Hozuki/Noire
        private void Form1_Load(object sender, EventArgs e) {
            _lastWindowState = WindowState;
            _app.Initialize();
            _app.RunAsync();

            var camera = _app.Camera;
            camera.Position = new Vector3(0, 5, -15);
            camera.LookAt(Vector3.Zero, Vector3.UnitY);

            var scene = new ShadowScene(_app, _app);
            scene.Initialize();
            scene.Name = "ShapesScene";
            _scene = scene;
            _app.ChildComponents.Add(scene);
            var inputHandler = new InputHandler(_app, _app);
            inputHandler.Initialize();
            _app.ChildComponents.Add(inputHandler);

            scene.SetShadowEnabled(true);
            scene.SetReflectionEnabled(true);
            scene.SetMaterialType(MaterialType.Copper);
            scene.SetNumberOfLights(NumberOfLights.Three);
            scene.SetSkyboxType(SkyboxType.None);
            scene.SetShadowEnabled(false);

            mnuDisplayNormal.Checked = true;
            mnuLights3.Checked = true;
            mnuSkyboxDisabled.Checked = true;
            mnuTextureCopper.Checked = true;
            mnuSurfaceDisabled.Checked = true;
            mnuShadowDisabled.Checked = true;
        }