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)

Syntax

public void Clear (
         Color color
)

Parameters

  • color
    Color value to which the render target surface is cleared.

Exceptions

Exception type Condition
ObjectDisposedException Clear was called after this GraphicsDevice was disposed.

See Also

Reference

GraphicsDevice Class
GraphicsDevice Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Xbox 360, Windows XP SP2, Windows Vista