Do not render waterPlane if it doesn't exist.
This commit is contained in:
parent
e888d7df0e
commit
f35d35cc94
@ -64,7 +64,7 @@ void Level::render(ACGL::OpenGL::SharedShaderProgram shader, bool lightingPass,
|
|||||||
objects.at(i)->render(shader, lightingPass, false, viewProjectionMatrix, shadowVPs);
|
objects.at(i)->render(shader, lightingPass, false, viewProjectionMatrix, shadowVPs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (lightingPass) {
|
if (lightingPass && waterPlane) {
|
||||||
waterPlane->render(shader, lightingPass, true, viewProjectionMatrix, shadowVPs);
|
waterPlane->render(shader, lightingPass, true, viewProjectionMatrix, shadowVPs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user