# XNA Sprites Not Drawing Correctly

I have a problem through out my current code where certain Texture2D's are not drawing correctly over each other.

For example, at the start I have sprite font being drawn over a background image and half the text is not shown when I add the image.

        _sb.Draw(_background, new Rectangle(0, 0, 800, 480), Color.White);
if (isPaused)
_sb.DrawString(_bigFont, "Resume", new Vector2(295, 200), Color.Black);
else
_sb.DrawString(_bigFont, "Start", new Vector2(315, 200), Color.Black);


The text then seems to appear if I change the value of other text on the screen.

Is there something I am missing here?

Thanks.

• How are you initializing the SpriteBatch? – John McDonald Feb 24 '12 at 23:35
• spriteBatch = new SpriteBatch(GraphicsDevice); – boburob Feb 24 '12 at 23:38
• spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend); – boburob Feb 24 '12 at 23:38
• Can we have a picture? – ClassicThunder Feb 25 '12 at 0:03
• tinypic.com/r/28vef77/5 When I update the something else on the screen the text appears. – boburob Feb 25 '12 at 0:16

Unless you are actually playing with the Depth, you should be using SpriteSortMode.Deferred. MSDN Doc Here