public virtual void Go( Sample initialSample )
{
bool firstRun = true;
while ( !this.IsLastRun )
{
this.IsLastRun = true; // assume this is our last run
CreateRoot();
if ( !OneTimeConfig() )
return;
// if the context was reconfigured, set requested renderer
if ( !firstRun )
this.Root.RenderSystem = this.Root.RenderSystems[ this.NextRenderer ];
Setup();
// restore the last sample if there was one or, if not, start initial sample
if ( !firstRun )
RecoverLastSample();
else if ( initialSample != null )
RunSample( initialSample );
this.Root.StartRendering(); // start the render loop
ConfigurationManager.SaveConfiguration( Root, this.NextRenderer );
Shutdown();
if ( this.Root != null )
this.Root.Dispose();
firstRun = false;
}
}