At the time of this writing if you are rendering to a render target that is of different size than your game, then you may see that either:
// make the engine draw to the buffer
GraphicsDevice.SetRenderTarget(buffer);
GeneratedDrawEarly(gameTime);
FlatRedBallServices.Draw();
GeneratedDraw(gameTime);
// reset the render target to null
GraphicsDevice.SetRenderTarget(null);
// draw the buffer to the screen
spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);
var destinationRectangle = new Rectangle(0, 0, buffer.Width, buffer.Height);
spriteBatch.Draw(buffer, destinationRectangle, Color.White);
spriteBatch.End();
base.Draw(gameTime);if(!ScreenManager.IsInEditMode)
{
// make the engine draw to the buffer
GraphicsDevice.SetRenderTarget(buffer);
}
GeneratedDrawEarly(gameTime);
FlatRedBallServices.Draw();
GeneratedDraw(gameTime);
if(!ScreenManager.IsInEditMode)
{
// reset the render target to null
GraphicsDevice.SetRenderTarget(null);
// draw the buffer to the screen
spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);
//spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, effect: activeEffect);
var destinationRectangle = new Rectangle(0, 0, buffer.Width, buffer.Height);
spriteBatch.Draw(buffer, destinationRectangle, Color.White);
spriteBatch.End();
}
base.Draw(gameTime);