Exemple #1
0
        public override void Render(Batcher batcher)
        {
            Core.GraphicsDevice.SetRenderTarget(null);

            // if we are scaling out we dont need to render the previous scene anymore since we want the new scene to be visible
            if (!_isNewSceneLoaded)
            {
                batcher.Begin(BlendState.Opaque, Core.DefaultSamplerState, DepthStencilState.None, null);
                batcher.Draw(PreviousSceneRender, Vector2.Zero, Color.White);
                batcher.End();
            }

            batcher.Begin(_blendState, Core.DefaultSamplerState, DepthStencilState.None, null);
            batcher.Draw(_maskRenderTarget, Vector2.Zero, Color.White);
            batcher.End();
        }
Exemple #2
0
 public override void Render(Batcher batcher)
 {
     Core.GraphicsDevice.SetRenderTarget(null);
     batcher.Begin(BlendState.NonPremultiplied, Core.DefaultSamplerState, DepthStencilState.None, null);
     batcher.Draw(PreviousSceneRender, Vector2.Zero, _color);
     batcher.End();
 }
Exemple #3
0
 /// <summary>
 /// do all of your rendering here.static This is a base implementation. Any special rendering should override
 /// this method.
 /// </summary>
 /// <param name="batcher">Batcher.</param>
 public virtual void Render(Batcher batcher)
 {
     Core.GraphicsDevice.SetRenderTarget(null);
     batcher.Begin(BlendState.Opaque, Core.DefaultSamplerState, DepthStencilState.None, null);
     batcher.Draw(PreviousSceneRender, Vector2.Zero, Color.White);
     batcher.End();
 }
Exemple #4
0
 public override void Render(Batcher batcher)
 {
     Core.GraphicsDevice.SetRenderTarget(null);
     batcher.Begin(BlendState.NonPremultiplied, Core.DefaultSamplerState, DepthStencilState.None, null);
     batcher.Draw(PreviousSceneRender, _destinationRect, Color.White);
     batcher.End();
 }
Exemple #5
0
 public override void PreRender(Batcher batcher)
 {
     Core.GraphicsDevice.SetRenderTarget(_maskRenderTarget);
     batcher.Begin(BlendState.AlphaBlend, Core.DefaultSamplerState, DepthStencilState.None, null);
     batcher.Draw(_maskTexture, _maskPosition, null, Color.White, _renderRotation, _maskOrigin,
                  _renderScale, SpriteEffects.None, 0);
     batcher.End();
     Core.GraphicsDevice.SetRenderTarget(null);
 }
Exemple #6
0
        public override void Render(Batcher batcher)
        {
            Core.GraphicsDevice.SetRenderTarget(null);
            batcher.Begin(BlendState.NonPremultiplied, Core.DefaultSamplerState, DepthStencilState.None, null);

            // we only render the previousSceneRender while fading to _color. It will be null after that.
            if (!_isNewSceneLoaded)
            {
                batcher.Draw(PreviousSceneRender, _destinationRect, Color.White);
            }

            batcher.Draw(_overlayTexture, new Rectangle(0, 0, Screen.Width, Screen.Height), _color);

            batcher.End();
        }
Exemple #7
0
 public static void EndWindow()
 {
     _batcher.End();
 }