diff options
author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-06-11 13:38:43 +0200 |
---|---|---|
committer | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-06-11 13:38:43 +0200 |
commit | d9789bfaf230e301873bd700f6f360d306dc2486 (patch) | |
tree | 4b2dd2680905ca9821e2b11b36aa63dfe7af4f84 /indra/newview/llviewermenu.cpp | |
parent | 9f6b8484dfb7dfa981d8a8ac3693d3f68e32bc12 (diff) | |
parent | a73773bc1abdac6bc3beea36fd4ba58eba686e13 (diff) |
Merge branch 'main' of https://github.com/secondlife/viewer into DRTVWR-600-maint-A
# Conflicts:
# indra/llappearance/llavatarappearance.h
# indra/llimage/llimage.cpp
# indra/llmath/llvolume.cpp
# indra/llmath/llvolume.h
# indra/llprimitive/llgltfmaterial.h
# indra/llrender/llrendertarget.cpp
# indra/llrender/llshadermgr.cpp
# indra/newview/lldynamictexture.cpp
# indra/newview/llenvironment.cpp
# indra/newview/llfetchedgltfmaterial.cpp
# indra/newview/llfloaterimagepreview.cpp
# indra/newview/llfloaterimagepreview.h
# indra/newview/llfloaterregioninfo.cpp
# indra/newview/llfloaterregioninfo.h
# indra/newview/llmaniprotate.cpp
# indra/newview/llmaniptranslate.cpp
# indra/newview/llpanelvolume.cpp
# indra/newview/llselectmgr.cpp
# indra/newview/llselectmgr.h
# indra/newview/llsurface.cpp
# indra/newview/llsurface.h
# indra/newview/llsurfacepatch.cpp
# indra/newview/lltexturectrl.cpp
# indra/newview/lltexturectrl.h
# indra/newview/lltinygltfhelper.cpp
# indra/newview/llviewertexture.cpp
# indra/newview/llviewerwindow.cpp
# indra/newview/llviewerwindow.h
# indra/newview/llvlcomposition.cpp
# indra/newview/llvlcomposition.h
# indra/newview/llvocache.cpp
# indra/newview/llvovolume.cpp
# indra/newview/pipeline.cpp
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 70 |
1 files changed, 68 insertions, 2 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 273aa3441a..2074bda097 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -141,6 +141,7 @@ #include <boost/algorithm/string.hpp> #include "llcleanup.h" #include "llviewershadermgr.h" +#include "gltfscenemanager.h" using namespace LLAvatarAppearanceDefines; @@ -529,10 +530,8 @@ void init_menus() LLGridManager::getInstance()->isInProductionGrid()); // *TODO:Also fix cost in llfolderview.cpp for Inventory menus - const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()); const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost()); const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost()); - gMenuHolder->childSetLabelArg("Upload Image", "[COST]", texture_upload_cost_str); gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", sound_upload_cost_str); gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", animation_upload_cost_str); @@ -743,10 +742,30 @@ U32 render_type_from_string(std::string render_type) { return LLPipeline::RENDER_TYPE_SIMPLE; } + if ("materials" == render_type) + { + return LLPipeline::RENDER_TYPE_MATERIALS; + } else if ("alpha" == render_type) { return LLPipeline::RENDER_TYPE_ALPHA; } + else if ("alpha_mask" == render_type) + { + return LLPipeline::RENDER_TYPE_ALPHA_MASK; + } + else if ("fullbright_alpha_mask" == render_type) + { + return LLPipeline::RENDER_TYPE_FULLBRIGHT_ALPHA_MASK; + } + else if ("fullbright" == render_type) + { + return LLPipeline::RENDER_TYPE_FULLBRIGHT; + } + else if ("glow" == render_type) + { + return LLPipeline::RENDER_TYPE_GLOW; + } else if ("tree" == render_type) { return LLPipeline::RENDER_TYPE_TREE; @@ -999,6 +1018,10 @@ U64 info_display_from_string(std::string info_display) { return LLPipeline::RENDER_DEBUG_OCTREE; } + else if ("nodes" == info_display) + { + return LLPipeline::RENDER_DEBUG_NODES; + } else if ("shadow frusta" == info_display) { return LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA; @@ -2175,6 +2198,20 @@ class LLAdvancedPurgeShaderCache : public view_listener_t } }; +///////////////////// +// REBUILD TERRAIN // +///////////////////// + + +class LLAdvancedRebuildTerrain : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + gPipeline.rebuildTerrain(); + return true; + } +}; + //////////////////// // EVENT Recorder // /////////////////// @@ -8025,6 +8062,30 @@ class LLAdvancedClickRenderBenchmark: public view_listener_t } }; +void hdri_preview(); + +class LLAdvancedClickHDRIPreview: public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + // open personal lighting floater when previewing an HDRI (keeps HDRI from implicitly unloading when opening build tools) + LLFloaterReg::showInstance("env_adjust_snapshot"); + hdri_preview(); + return true; + } +}; + + +class LLAdvancedClickGLTFScenePreview : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + // open personal lighting floater when previewing an HDRI (keeps HDRI from implicitly unloading when opening build tools) + LL::GLTFSceneManager::instance().load(); + return true; + } +}; + // these are used in the gl menus to set control values that require shader recompilation class LLToggleShaderControl : public view_listener_t { @@ -9376,6 +9437,8 @@ void LLUploadCostCalculator::calculateCost(const std::string& asset_type_str) if (asset_type_str == "texture") { + // This use minimal texture cost to allow bulk and + // texture upload menu options to be visible upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(); } else if (asset_type_str == "animation") @@ -9674,7 +9737,10 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedClickRenderShadowOption(), "Advanced.ClickRenderShadowOption"); view_listener_t::addMenu(new LLAdvancedClickRenderProfile(), "Advanced.ClickRenderProfile"); view_listener_t::addMenu(new LLAdvancedClickRenderBenchmark(), "Advanced.ClickRenderBenchmark"); + view_listener_t::addMenu(new LLAdvancedClickHDRIPreview(), "Advanced.ClickHDRIPreview"); + view_listener_t::addMenu(new LLAdvancedClickGLTFScenePreview(), "Advanced.ClickGLTFScenePreview"); view_listener_t::addMenu(new LLAdvancedPurgeShaderCache(), "Advanced.ClearShaderCache"); + view_listener_t::addMenu(new LLAdvancedRebuildTerrain(), "Advanced.RebuildTerrain"); #ifdef TOGGLE_HACKED_GODLIKE_VIEWER view_listener_t::addMenu(new LLAdvancedHandleToggleHackedGodmode(), "Advanced.HandleToggleHackedGodmode"); |