Microsoft DirectX 9.0 SDK Update (October 2004)

Device.Clear Method

Language:

Note: This documentation is preliminary and is subject to change.

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.

Overload List

public void Clear(ClearFlags, Color, float, int);
public void Clear(ClearFlags, Color, float, int, Rectangle[]);
public void Clear(ClearFlags, int, float, int);
public void Clear(ClearFlags, int, float, int, Rectangle[]);

Remarks

This method fails if the ZBuffer or Stencil flags are specified when the render target does not have an attached depth buffer. Similarly, the method fails if the Stencil flag is specified when the depth-buffer format does not contain stencil buffer information.

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


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center