【发布时间】:2012-09-23 04:03:29
【问题描述】:
我在 XNA 4.0 3D 中绘制字符串时遇到问题。我知道问题是 spriteBatch.Begin()。但是不知道怎么解决。
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.DeepSkyBlue);
//Draw string
spriteBatch.Begin();
spriteBatch.DrawString(fontArial, "Demotesting", new Vector2(100, 100), Color.Red);
spriteBatch.End();
//Draw Models Ship
ship.Draw();
base.Draw(gameTime);
}
在绘制字符串之前: http://nq1.upanh.com/b4.s32.d1/6c6ce19bded8d054341ce45e17426c51_49358001.before.png
绘制字符串后: http://nq2.upanh.com/b6.s30.d2/9ff7c3c009215348b06a53c5a067d282_49358002.after.png
【问题讨论】: