コード例 #1
0
ファイル: DebugForm.cs プロジェクト: MUTTERSCHIFF/omegaengine
        private void SelectView(View view)
        {
            // ReSharper disable RedundantComparisonWithNull
            dumpViewButton.Enabled = view is TextureView;
            // ReSharper restore RedundantComparisonWithNull

            if (viewPropertyGrid.SelectedObject != view)
            {
                viewPropertyGrid.SelectedObject = view;
                if (view == null)
                {
                    cameraPropertyGrid.SelectedObject = null;
                    cameraLabel.Text = "Camera:";
                }
                else
                {
                    cameraPropertyGrid.SelectedObject = view.Camera;
                    cameraLabel.Text = view.Camera.ToString();
                }
            }

            UpdateShaders();
            UpdateRenderables();
            UpdateLights();
        }
コード例 #2
0
        private void InitializeScene(Engine engine)
        {
            var scene = new Scene
            {
                Positionables = { Model.Sphere(engine, XTexture.Get(engine, "flag.png")) }
            };

            _camera = new TrackCamera {
                VerticalRotation = 20
            };
            var view = new View(scene, _camera)
            {
                BackgroundColor = Color.CornflowerBlue
            };

            engine.Views.Add(view);
        }