This documentation is archived and is not being maintained.

GraphicsDevice.Clear Method (Color)

Clears the viewport to a specified color.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

public void Clear (
         Color color


Color value to which the render target surface is cleared.

Exception typeCondition
ObjectDisposedException Clear was called after this GraphicsDevice was disposed.

Xbox 360, Windows XP SP2, Windows Vista, Zune