forked from townforge/townforge
game: clear screen before drawing the splash screen
This commit is contained in:
parent
0493970b30
commit
59670f81f6
@ -7303,11 +7303,8 @@ void CryptoCityUrho3D::ShowSplashScreen()
|
||||
ShaderVariation* vs = graphics->GetShader(VS, "Basic", "DIFFMAP VERTEXCOLOR");
|
||||
ShaderVariation* ps = graphics->GetShader(PS, "Basic", "DIFFMAP VERTEXCOLOR");
|
||||
|
||||
for (int pass = 0; pass < 2; ++pass)
|
||||
{
|
||||
|
||||
const float wratio = pass == 1 ? texture->GetWidth() / (float)graphics->GetWidth() : 1.0f;
|
||||
const float hratio = pass == 1 ? texture->GetHeight() / (float)graphics->GetHeight() : 1.0f;
|
||||
const float wratio = texture->GetWidth() / (float)graphics->GetWidth();
|
||||
const float hratio = texture->GetHeight() / (float)graphics->GetHeight();
|
||||
if (wratio > hratio)
|
||||
{
|
||||
h = hratio / wratio;
|
||||
@ -7370,6 +7367,8 @@ void CryptoCityUrho3D::ShowSplashScreen()
|
||||
|
||||
graphics->BeginFrame();
|
||||
|
||||
graphics->Clear(CLEAR_COLOR | CLEAR_DEPTH | CLEAR_STENCIL);
|
||||
|
||||
graphics->ClearParameterSources();
|
||||
graphics->SetBlendMode(BLEND_ALPHA);
|
||||
graphics->SetColorWrite(true);
|
||||
@ -7387,12 +7386,10 @@ void CryptoCityUrho3D::ShowSplashScreen()
|
||||
graphics->SetShaderParameter(VSP_VIEWPROJ, gpuProjection * view);
|
||||
graphics->SetShaderParameter(PSP_MATDIFFCOLOR, Color(1.0f, 1.0f, 1.0f, 1.0f));
|
||||
|
||||
graphics->SetTexture(0, pass == 1 ? texture : NULL);
|
||||
graphics->SetTexture(0, texture);
|
||||
graphics->SetVertexBuffer(vertexBuffer);
|
||||
graphics->Draw(TRIANGLE_LIST, 0, 6);
|
||||
graphics->EndFrame();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void CryptoCityUrho3D::CreateDebugHud()
|
||||
|
Loading…
Reference in New Issue
Block a user