Add shadows behind a render-menu flag
Showing the changes to interface/src/Application.cpp (1 of 19 files). Show all
Unified · Split
| @@ -99,6 +99,7 @@ · 98 unmodified lines | ||
| 99 | 99 | #include <plugins/PluginContainer.h> |
| 100 | 100 | #include <plugins/PluginManager.h> |
| 101 | 101 | #include <RenderableWebEntityItem.h> |
| 102 | +#include <RenderShadowTask.h> | |
| 102 | 103 | #include <RenderDeferredTask.h> |
| 103 | 104 | #include <ResourceCache.h> |
| 104 | 105 | #include <RenderScriptingInterface.h> |
| @@ -673,7 +674,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 568 unmodified lines | ||
| 673 | 674 | initializeGL(); |
| 674 | 675 | |
| 675 | 676 | // Start rendering |
| 676 | − _renderEngine->addTask(make_shared<RenderDeferredTask>(LODManager::shouldRender)); | |
| 677 | + render::CullFunctor cullFunctor = LODManager::shouldRender; | |
| 678 | + _renderEngine->addTask(make_shared<RenderShadowTask>(cullFunctor)); | |
| 679 | + _renderEngine->addTask(make_shared<RenderDeferredTask>(cullFunctor)); | |
| 677 | 680 | _renderEngine->registerScene(_main3DScene); |
| 678 | 681 | |
| 679 | 682 | _offscreenContext->makeCurrent(); |
| @@ -3760,9 +3763,10 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se · 3080 unmodified lines | ||
| 3760 | 3763 | renderContext.setArgs(renderArgs); |
| 3761 | 3764 | |
| 3762 | 3765 | bool occlusionStatus = Menu::getInstance()->isOptionChecked(MenuOption::DebugAmbientOcclusion); |
| 3766 | + bool shadowStatus = Menu::getInstance()->isOptionChecked(MenuOption::DebugShadows); | |
| 3763 | 3767 | bool antialiasingStatus = Menu::getInstance()->isOptionChecked(MenuOption::Antialiasing); |
| 3764 | 3768 | bool showOwnedStatus = Menu::getInstance()->isOptionChecked(MenuOption::PhysicsShowOwned); |
| 3765 | − renderContext.setOptions(occlusionStatus, antialiasingStatus, showOwnedStatus); | |
| 3769 | + renderContext.setOptions(occlusionStatus, antialiasingStatus, showOwnedStatus, shadowStatus); | |
| 3766 | 3770 | |
| 3767 | 3771 | _renderEngine->setRenderContext(renderContext); |
| 3768 | 3772 | |