hey,
i am programming a app state manager and have some problems with the loading screen :-/
i had something like this in mind
[code]bool GamePlayState::Begin( )
{
// Switch in to the loading state.
Loading * mLoadingState = (Loading*) SpawnChildState( “Loading”, true );
mLoadingState->Render();
// Create the scene content
CreateScene();
mLoadingState->Render();
// Create the UI content
CreateInstructions();
mLoadingState->Render();
// Setup the viewport for displaying the scene
SetupViewport();
mLoadingState->Render();
mLoadingState->End();
// Call base class implementation last.
return AppState::Begin();
}[/code]
i know there is a the LoadAsyncXML() function to load a scene but i dont load a xml file …
i thought i could do somthing like that
[code]void Loading::Render()
{
String text = instructionText->GetText();
text.Append(".");
instructionText->SetText(text);
Graphics* graphics = GetSubsystem<Graphics>();
if (!graphics->BeginFrame())
return;
GetSubsystem<Renderer>()->Render();
GetSubsystem<UI>()->Render();
graphics->EndFrame();
}[/code]
manualy rendering the view screen but that does not work :-/
is there a way to do it ? or is there a better way to create a loading screen ?