Fix crashes and add a hunk I forgot
This commit is contained in:
parent
5f1413e140
commit
219bfbca93
@ -1023,7 +1023,7 @@ void IrrDriver::renderLights(unsigned pointlightcount)
|
||||
irr_driver->getSceneManager()->setAmbientLight(SColor(0, 0, 0, 0));
|
||||
|
||||
// Render sunlight if and only if track supports shadow
|
||||
if (World::getWorld()->getTrack()->hasShadows())
|
||||
if (World::getWorld() && World::getWorld()->getTrack()->hasShadows())
|
||||
{
|
||||
if (UserConfigParams::m_shadows)
|
||||
m_post_processing->renderShadowedSunlight(sun_ortho_matrix, m_rtts->getShadowDepthTex());
|
||||
|
@ -179,7 +179,7 @@ void ModelViewWidget::update(float delta)
|
||||
|
||||
std::vector<IrrDriver::GlowData> glows;
|
||||
irr_driver->computeCameraMatrix(m_camera, 512, 512);
|
||||
irr_driver->renderScene(m_camera, glows, GUIEngine::getLatestDt(), false, true);
|
||||
irr_driver->renderScene(m_camera, 0, glows, GUIEngine::getLatestDt(), false, true);
|
||||
m_frame_buffer = irr_driver->getPostProcessing()->render(m_camera);
|
||||
glViewport(0, 0, UserConfigParams::m_width, UserConfigParams::m_height);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user