Do not render waterPlane if it doesn't exist.

This commit is contained in:
Faerbit 2015-03-14 15:01:06 +01:00
parent e888d7df0e
commit f35d35cc94

View File

@ -64,7 +64,7 @@ void Level::render(ACGL::OpenGL::SharedShaderProgram shader, bool lightingPass,
objects.at(i)->render(shader, lightingPass, false, viewProjectionMatrix, shadowVPs);
}
}
if (lightingPass) {
if (lightingPass && waterPlane) {
waterPlane->render(shader, lightingPass, true, viewProjectionMatrix, shadowVPs);
}
}