Removing the default case from the renderer

This commit is contained in:
Sam Gateau 2017-06-27 14:24:34 +02:00
parent 7687bdc060
commit 76dae279cf

View file

@ -54,13 +54,11 @@ BackgroundStage::BackgroundPointer BackgroundStage::removeBackground(Index index
void DrawBackgroundStage::run(const render::RenderContextPointer& renderContext, const Inputs& inputs) {
const auto& lightingModel = inputs;
if (!lightingModel->isBackgroundEnabled()) {
return;
}
// Background rendering decision
auto backgroundStage = renderContext->_scene->getStage<BackgroundStage>();
model::SunSkyStagePointer background;
@ -71,10 +69,7 @@ void DrawBackgroundStage::run(const render::RenderContextPointer& renderContext,
if (background) {
skybox = background->getSkybox();
}
} else {
skybox = backgroundStage->getBackground(0)->getSkybox();
}
/* auto backgroundMode = skyStage->getBackgroundMode();
switch (backgroundMode) {