1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice device = graphics.GraphicsDevice;
            Viewport viewport = device.Viewport;

            base.Draw(gameTime);

            bloom.BeginDraw();
            device.Clear(Color.Transparent);
            DrawOverlayText();
            bloom.EndDraw();

            device.Clear(Color.Black);
            spriteBatch.Begin(0, BlendState.Opaque);
            spriteBatch.Draw(background, new Rectangle(0, 0, viewport.Width, viewport.Height), Color.White);
            spriteBatch.End();
            device.DepthStencilState = DepthStencilState.Default;
            DrawModel(gameTime);

            spriteBatch.Begin();
            spriteBatch.Draw(bloom.FinalRenderTarget, new Rectangle(0, 0, viewport.Width, viewport.Height), Color.White);
            spriteBatch.End();
        }