我有代码在c# XNA中的绘制方法。
spriteBatch.Begin(SpriteSortMode.Deferred, null, null, null, null, null, CameraMatrix());
spriteBatch.Draw... (1)
spriteBatch.Draw... (2)
spriteBatch.End();
base.Draw(gameTime);,我想分开我的平局,,因为我在spriteBatch.begin矩阵中,害怕表现,->用数学计算。我要类似的代码。
spriteBatch.Begin(SpriteSortMode.Deferred, null, null, null, null, null, CameraMatrix());
spriteBatch.Draw... (1)
spriteBatch.End();
spriteBatch.Begin();
spriteBatch.Draw... (2)
spriteBatch.End();
base.Draw(gameTime);..。但这不是画。有人能帮我吗?
发布于 2017-08-28 00:34:15
我用您所描述的方法拆分了我的spriteBatch,它运行得很好。您是否确保调整第二组中的绘制调用位置以说明更改的来源?如果没有spriteBatch.Begin()的参数,将只绘制视图端口矩形(或其部分)中的精灵。
https://stackoverflow.com/questions/45896664
复制相似问题