FlatRedBall.Graphics.PostProcessing.Blur.Draw C# (CSharp) Method

Draw() public method

Draws the effect
public Draw ( Camera camera, Microsoft.Xna.Framework.Graphics.Texture2D &screenTexture, Rectangle &baseRectangle, Color clearColor ) : void
camera Camera
screenTexture Microsoft.Xna.Framework.Graphics.Texture2D The screen texture
baseRectangle Microsoft.Xna.Framework.Rectangle The rectangle to draw to
clearColor Color The background color
return void
        public override void Draw(
            Camera camera,
            ref Texture2D screenTexture,
            ref Rectangle baseRectangle,
            Color clearColor)
        {
            // Set the effect parameters
            SetEffectParameters(camera);

            #region Horizontal Blur

            // Set the effect technique
            mEffect.CurrentTechnique = mEffect.Techniques[mTechniqueHorizontal];

            // Draw the horizontal pass
            DrawToTexture(camera, ref mTexture, clearColor, ref screenTexture, ref baseRectangle);

            #endregion

            #region Vertical Blur

            // Set the effect technique
            mEffect.CurrentTechnique = mEffect.Techniques[mTechniqueVertical];

            // Draw the vertical pass
            DrawToTexture(camera, ref mTexture, clearColor, ref mTexture, ref baseRectangle);

            #endregion
        }