diff options
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 75 |
1 files changed, 72 insertions, 3 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 22fe0a043b..53cf44214e 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -982,6 +982,10 @@ U32 info_display_from_string(std::string info_display) { return LLPipeline::RENDER_DEBUG_AVATAR_VOLUME; } + else if ("raycast" == info_display) + { + return LLPipeline::RENDER_DEBUG_RAYCAST; + } else if ("agent target" == info_display) { return LLPipeline::RENDER_DEBUG_AGENT_TARGET; @@ -1175,6 +1179,29 @@ class LLAdvancedCheckDisableTextures : public view_listener_t } }; +////////////////////// +// TEXTURE ATLAS // +////////////////////// + +class LLAdvancedToggleTextureAtlas : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLViewerTexture::sUseTextureAtlas = !LLViewerTexture::sUseTextureAtlas; + gSavedSettings.setBOOL("EnableTextureAtlas", LLViewerTexture::sUseTextureAtlas) ; + return true; + } +}; + +class LLAdvancedCheckTextureAtlas : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + bool new_value = LLViewerTexture::sUseTextureAtlas; // <-- make this using LLCacheControl + return new_value; + } +}; + ////////////////////////// // DUMP SCRIPTED CAMERA // ////////////////////////// @@ -2148,11 +2175,48 @@ class LLAdvancedEnableObjectObjectOcclusion: public view_listener_t bool handleEvent(const LLSD& userdata) { - bool new_value = gGLManager.mHasOcclusionQuery && LLFeatureManager::getInstance()->isFeatureAvailable(userdata.asString()); + bool new_value = gGLManager.mHasOcclusionQuery; // && LLFeatureManager::getInstance()->isFeatureAvailable(userdata.asString()); return new_value; } }; +///////////////////////////////////// +// Enable Framebuffer Objects /// +///////////////////////////////////// +class LLAdvancedEnableRenderFBO: public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + bool new_value = gGLManager.mHasFramebufferObject; + return new_value; + } +}; + +///////////////////////////////////// +// Enable Deferred Rendering /// +///////////////////////////////////// +class LLAdvancedEnableRenderDeferred: public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + bool new_value = gSavedSettings.getBOOL("RenderUseFBO") && LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_WINDLIGHT > 0) && + LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_AVATAR) > 0; + return new_value; + } +}; + +///////////////////////////////////// +// Enable Global Illumination /// +///////////////////////////////////// +class LLAdvancedEnableRenderDeferredGI: public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + bool new_value = gSavedSettings.getBOOL("RenderUseFBO") && gSavedSettings.getBOOL("RenderDeferred"); + return new_value; + } +}; + ////////////////// @@ -2775,7 +2839,7 @@ class LLSelfRemoveAllAttachments : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLAgentWearables::userRemoveAllAttachments(NULL); + LLAgentWearables::userRemoveAllAttachments(); return true; } }; @@ -7795,7 +7859,12 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedCheckWireframe(), "Advanced.CheckWireframe"); view_listener_t::addMenu(new LLAdvancedToggleDisableTextures(), "Advanced.ToggleDisableTextures"); view_listener_t::addMenu(new LLAdvancedCheckDisableTextures(), "Advanced.CheckDisableTextures"); + view_listener_t::addMenu(new LLAdvancedToggleTextureAtlas(), "Advanced.ToggleTextureAtlas"); + view_listener_t::addMenu(new LLAdvancedCheckTextureAtlas(), "Advanced.CheckTextureAtlas"); view_listener_t::addMenu(new LLAdvancedEnableObjectObjectOcclusion(), "Advanced.EnableObjectObjectOcclusion"); + view_listener_t::addMenu(new LLAdvancedEnableRenderFBO(), "Advanced.EnableRenderFBO"); + view_listener_t::addMenu(new LLAdvancedEnableRenderDeferred(), "Advanced.EnableRenderDeferred"); + view_listener_t::addMenu(new LLAdvancedEnableRenderDeferredGI(), "Advanced.EnableRenderDeferredGI"); view_listener_t::addMenu(new LLAdvancedToggleRandomizeFramerate(), "Advanced.ToggleRandomizeFramerate"); view_listener_t::addMenu(new LLAdvancedCheckRandomizeFramerate(), "Advanced.CheckRandomizeFramerate"); view_listener_t::addMenu(new LLAdvancedTogglePeriodicSlowFrame(), "Advanced.TogglePeriodicSlowFrame"); @@ -7900,7 +7969,7 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedForceErrorInfiniteLoop(), "Advanced.ForceErrorInfiniteLoop"); view_listener_t::addMenu(new LLAdvancedForceErrorSoftwareException(), "Advanced.ForceErrorSoftwareException"); view_listener_t::addMenu(new LLAdvancedForceErrorDriverCrash(), "Advanced.ForceErrorDriverCrash"); - view_listener_t::addMenu(new LLAdvancedForceErrorDriverCrash(), "Advanced.ForceErrorDisconnectViewer"); + view_listener_t::addMenu(new LLAdvancedForceErrorDisconnectViewer(), "Advanced.ForceErrorDisconnectViewer"); // Advanced (toplevel) view_listener_t::addMenu(new LLAdvancedToggleShowObjectUpdates(), "Advanced.ToggleShowObjectUpdates"); |