Share via


Device.Clear Method

Include Protected Members
Include Inherited Members

Include .NET Framework Members
Include .NET Compact Framework Members
Include XNA Framework Members

Clears the viewport or a set of rectangles in the viewport to a specified RGBA color, clears the depth buffer, and erases the stencil buffer.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

  Name Description
Public methodSupported by the .NET Compact Framework Clear(ClearFlags, Color, Single, Int32) Clears the viewport or a set of rectangles in the viewport to a specified RGBA color, clears the depth buffer, and erases the stencil buffer.
Public methodSupported by the .NET Compact Framework Clear(ClearFlags, Int32, Single, Int32) Clears the viewport or a set of rectangles in the viewport to a specified RGBA color, clears the depth buffer, and erases the stencil buffer.
Public methodSupported by the .NET Compact Framework Clear(ClearFlags, Color, Single, Int32, array<Rectangle[]) Clears the viewport or a set of rectangles in the viewport to a specified RGBA color, clears the depth buffer, and erases the stencil buffer.

Top

Exceptions

Exception Condition
InvalidCallException

The method call is invalid. For example, a parameter might contain an invalid value.

See Also

Reference

Device Class

Device Members

Microsoft.WindowsMobile.DirectX.Direct3D Namespace