Description
The ClearFlags.All
field is a member of the ClearFlags
enumeration in the Sandbox namespace. It is used to specify that all buffers (color, depth, and stencil) should be cleared before rendering a scene using a SceneCamera
. This is useful when you want to ensure that no previous frame data is retained, providing a clean slate for rendering the new frame.
Usage
Use ClearFlags.All
when you need to clear all buffers before rendering a new frame. This is typically used in scenarios where you want to avoid any artifacts from previous frames affecting the current rendering.
Example
// Example of using ClearFlags.All in a SceneCamera setup
SceneCamera camera = new SceneCamera();
camera.ClearFlags = ClearFlags.All;
// This will ensure that the color, depth, and stencil buffers are cleared
// before rendering the scene, providing a fresh start for each frame.