public void Draw(GameTime gameTime, RenderTarget2D renderTarget, ScreenStates screenState)
        {
            _graphics.SetRenderTarget(renderTarget);
            switch (screenState)
            {
            case ScreenStates.MainMenu:
            {
                _graphics.Clear(Color.CornflowerBlue);
                _guiRenderer.Draw(_mainMenuLogic.getCanvas());
                break;
            }

            case ScreenStates.RadialBlur:
            {
                _radialBlurRenderer.Draw(gameTime, renderTarget);
                _guiRenderer.Draw(_radialBlurLogic.GetCanvas());
                break;
            }

            case ScreenStates.Pixelizer:
            {
                _pixelizerRenderer.Draw(gameTime, renderTarget);
                _guiRenderer.Draw(_pixelizerLogic.GetCanvas());
                break;
            }

            case ScreenStates.Bokeh:
            {
                _bokehRenderer.Draw(gameTime, renderTarget);
                _guiRenderer.Draw(_bokehLogic.GetCanvas());
                break;
            }

            case ScreenStates.ParticlePhysics:
            {
                _particlePhysicsRenderer.Draw(gameTime, renderTarget);
                _guiRenderer.Draw(_particlePhysicsLogic.GetCanvas());
                break;
            }

            case ScreenStates.Subsurface:
            {
                _ssRenderer.Draw(gameTime, renderTarget);
                _guiRenderer.Draw(_ssLogic.GetCanvas());
                break;
            }

            case ScreenStates.FourierTransform:
            {
                _ftRenderer.Draw(gameTime, renderTarget);
                _guiRenderer.Draw(_ftLogic.GetCanvas());
                break;
            }

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Beispiel #2
0
        public void Draw(GameTime gameTime)
        {
            _renderer.Draw(_mainLogic.GetCamera(), _mainLogic, _mainLogic.modelPosition, _mainLogic.modelRotation, gameTime);

            _mainLogic.Draw(gameTime);

            //Our renderer gives us information on what id is currently hovered over so we can update / manipulate objects in the logic functions
            _debug.Draw(gameTime);

            _guiRenderer.Draw(_guiLogicSample.getCanvas());
        }
        public void Draw(GameTime gameTime)
        {
            //Our renderer gives us information on what id is currently hovered over so we can update / manipulate objects in the logic functions
            _editorReceivedDataBuffer = _renderer.Draw(_sceneLogic.Camera,
                                                       _sceneLogic.MeshMaterialLibrary,
                                                       _sceneLogic.BasicEntities, _sceneLogic.Decals,
                                                       pointLights: _sceneLogic.PointLights,
                                                       directionalLights: _sceneLogic.DirectionalLights,
                                                       envSample: _sceneLogic.EnvironmentSample,
                                                       volumeTexture: _sceneLogic.VolumeTexture,
                                                       editorData: _editorLogic.GetEditorData(),
                                                       gameTime: gameTime);

            if (GameSettings.e_enableeditor)
            {
                _guiRenderer.Draw(_guiLogic.GuiCanvas);
            }

            _debug.Draw(gameTime);
        }