public override void ClearFrameBuffer( FrameBufferType buffers, ColorEx color, Real depth, ushort stencil )
{
ClearFlags flags = 0;
if ( ( buffers & FrameBufferType.Color ) > 0 )
{
flags |= ClearFlags.Target;
}
if ( ( buffers & FrameBufferType.Depth ) > 0 )
{
flags |= ClearFlags.ZBuffer;
}
// Only try to clear the stencil buffer if supported
if ( ( buffers & FrameBufferType.Stencil ) > 0
&& Capabilities.HasCapability( Graphics.Capabilities.StencilBuffer ) )
{
flags |= ClearFlags.Stencil;
}
// clear the device using the specified params
ActiveD3D9Device.Clear(flags, color.ToARGB(), depth, stencil);
}