Shadow mapping now disables old shadows

master
krzys-h 2015-07-20 18:56:09 +02:00
parent 9e7cc0bab5
commit 7b3ae32626
2 changed files with 5 additions and 4 deletions

View File

@ -3242,14 +3242,14 @@ void CEngine::Draw3DScene()
if (!m_qualityShadows)
UseShadowMapping(false);
// Draws the shadows , if shadows enabled
if (m_shadowVisible)
// Draws the shadows, if shadows enabled and shadow mapping disabled
if (m_shadowVisible && !m_shadowMapping)
DrawShadow();
m_app->StopPerformanceCounter(PCNT_RENDER_TERRAIN);
// Draw other objects (and if shadows disabled, also terrain)
// Draw other objects
m_app->StartPerformanceCounter(PCNT_RENDER_OBJECTS);

View File

@ -4768,7 +4768,8 @@ void CMainDialog::UpdateSetupButtons()
pc = static_cast<CCheck*>(pw->SearchControl(EVENT_INTERFACE_SHADOW));
if ( pc != 0 )
{
pc->SetState(STATE_CHECK, m_engine->GetShadow());
pc->SetState(STATE_ENABLE, !m_engine->GetShadowMapping());
pc->SetState(STATE_CHECK, !m_engine->GetShadowMapping() && m_engine->GetShadow());
}
pc = static_cast<CCheck*>(pw->SearchControl(EVENT_INTERFACE_GROUND));