public virtual void FrameEnded( object sender, FrameEventArgs evt )
{
// manually call sample callback to ensure correct order
if ( CurrentSample != null && !IsSamplePaused )
{
CurrentSample.FrameStarted( evt );
}
// quit if window was closed
if ( RenderWindow.IsClosed )
evt.StopRendering = true;
// go into idle mode if current sample has ended
if ( CurrentSample != null && CurrentSample.IsDone )
RunSample( null );
}