Example #1
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)
 {
     GraphicsDeviceExt.SetRenderTarget(Core.GraphicsDevice, null);
     batcher.Begin(BlendState.Opaque, Core.DefaultSamplerState, DepthStencilState.None, null);
     batcher.Draw(PreviousSceneRender, System.Numerics.Vector2.Zero, Color.White);
     batcher.End();
 }
Example #2
0
 public override void Render(Batcher batcher)
 {
     GraphicsDeviceExt.SetRenderTarget(Core.GraphicsDevice, null);
     batcher.Begin(BlendState.NonPremultiplied, Core.DefaultSamplerState, DepthStencilState.None, null);
     batcher.Draw(PreviousSceneRender, Vector2.Zero, _color);
     batcher.End();
 }
Example #3
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();
        }
Example #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();
 }
Example #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);
 }
Example #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();
        }
Example #7
0
 public static void EndWindow()
 {
     _batcher.End();
 }