diff --git a/level.cc b/level.cc index f9abdcb..ec7eaf7 100644 --- a/level.cc +++ b/level.cc @@ -19,8 +19,8 @@ Level::~Level() { } for(unsigned int i = 0; irender(shader, lightingPass, true, viewProjectionMatrix, shadowVPs); - waterPlane->render(shader, lightingPass, true, viewProjectionMatrix, shadowVPs); } else { objects.at(i)->render(shader, lightingPass, false, viewProjectionMatrix, shadowVPs); } } + if (lightingPass) { + waterPlane->render(shader, lightingPass, true, viewProjectionMatrix, shadowVPs); + } } void Level::update(float runTimeSinceLastUpdate, float runTime, glm::vec2 mouseDelta, bool wPressed, bool aPressed, bool sPressed, bool dPressed,bool kPressed, bool lPressed) {