4

This might be a very simple question, but I searched and found no other way to do it. It doesn't make sense to redraw the background on every Draw. Is there a way to draw some things and leave them on the screen?

I've tried to comment-out the

GraphicsDevice.Clear(Color.CornflowerBlue);

But that doesn't help. (What is its purpose?)

4

2 に答える 2

0

これを参照してください。画像がクリアされるのを防ぎたい場合は、次のことができます。

GraphicsDevice.GetType().GetField("lazyClearFlags", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(GraphicsDevice, ClearOptions.DepthBuffer);
于 2013-06-03T23:50:27.350 に答える