protected bool Setup()
{
RepositoryClass.Instance.InitializeRepositoryPath();
// get a reference to the engine singleton
engine = new Root("", "trace.txt");
// add event handlers for frame events
engine.FrameStarted += new FrameEvent(OnFrameStarted);
engine.FrameEnded += new FrameEvent(OnFrameEnded);
// allow for setting up resource gathering
if (!SetupResources())
return false;
//show the config dialog and collect options
if (!ConfigureAxiom())
{
// shutting right back down
engine.Shutdown();
return false;
}
if (!CheckShaderCaps())
{
MessageBox.Show("Your graphics card does not support pixel shader 2.0 and vertex shader 2.0, which are required to run this tool.", "Graphics Card Not Supported", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
engine.Shutdown();
return false;
}
ChooseSceneManager();
CreateCamera();
CreateViewports();
// set default mipmap level
TextureManager.Instance.DefaultNumMipMaps = 5;
// call the overridden CreateScene method
CreateScene();
return true;
}