コード例 #1
0
ファイル: Renderer.cs プロジェクト: tgjones/meshellator
        public void Render(RenderParameters parameters)
        {
            RenderSettings renderSettings = new RenderSettings();
            renderSettings.ProjectionMatrix = _projection;
            renderSettings.ViewMatrix = Matrix3D.Invert(_cameraTransform.Value) * _view;
            renderSettings.Parameters = parameters;

            IoC.Get<IStatusBar>().Message = "Camera Location: " + renderSettings.ViewMatrix.Translation;

            _device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, new ColorF(0.3f, 0.3f, 0.3f).ToColorBGRA(), 1.0f, 0);
            _device.BeginScene();

            _model.Draw(renderSettings);

            _device.EndScene();
        }
コード例 #2
0
        public void Render(RenderParameters parameters)
        {
            RenderSettings renderSettings = new RenderSettings();

            renderSettings.ProjectionMatrix = _projection;
            renderSettings.ViewMatrix       = Matrix3D.Invert(_cameraTransform.Value) * _view;
            renderSettings.Parameters       = parameters;

            IoC.Get <IStatusBar>().Message = "Camera Location: " + renderSettings.ViewMatrix.Translation;

            _device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, new Color4(0.3f, 0.3f, 0.3f), 1.0f, 0);
            _device.BeginScene();

            _model.Draw(renderSettings);

            _device.EndScene();
        }