From 88c0a4d7be265784aeb6010e42df8632dbf8f88b Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 1 May 2010 03:32:22 -0700 Subject: Applied patch by Aleric Inglewood for VWR-12984: Water flickers and disappears in patches, part 1 --- linden/indra/llrender/llgl.cpp | 30 ++- linden/indra/llrender/llgl.h | 7 +- linden/indra/llrender/llglheaders.h | 10 + linden/indra/newview/app_settings/settings.xml | 11 + linden/indra/newview/lldrawable.cpp | 2 + linden/indra/newview/lldrawpool.cpp | 1 + linden/indra/newview/lldrawpool.h | 1 + linden/indra/newview/lldrawpoolground.cpp | 2 +- linden/indra/newview/lldrawpoolsky.cpp | 2 +- linden/indra/newview/lldrawpoolwater.cpp | 23 +- linden/indra/newview/lldrawpoolwlsky.cpp | 2 +- linden/indra/newview/llfloatergodtools.cpp | 18 +- linden/indra/newview/llspatialpartition.cpp | 27 +- linden/indra/newview/llspatialpartition.h | 8 +- linden/indra/newview/llsurface.cpp | 5 + linden/indra/newview/llviewerdisplay.cpp | 3 +- linden/indra/newview/llviewerobject.cpp | 3 + linden/indra/newview/llviewerobject.h | 19 +- linden/indra/newview/llviewerregion.cpp | 1 + linden/indra/newview/llviewerregion.h | 1 + linden/indra/newview/llviewerwindow.cpp | 5 + linden/indra/newview/llvosurfacepatch.cpp | 2 +- linden/indra/newview/llvowater.cpp | 27 +- linden/indra/newview/llvowater.h | 20 +- linden/indra/newview/llworld.cpp | 355 +++++++++++++++++++------ linden/indra/newview/llworld.h | 1 + linden/indra/newview/pipeline.cpp | 55 ++-- linden/indra/newview/pipeline.h | 3 +- 28 files changed, 477 insertions(+), 167 deletions(-) (limited to 'linden') diff --git a/linden/indra/llrender/llgl.cpp b/linden/indra/llrender/llgl.cpp index 61194c4..c08ad0d 100644 --- a/linden/indra/llrender/llgl.cpp +++ b/linden/indra/llrender/llgl.cpp @@ -552,41 +552,46 @@ extern LLCPUInfo gSysCPU; void LLGLManager::initExtensions() { #if LL_MESA_HEADLESS -# if GL_ARB_multitexture +# ifdef GL_ARB_multitexture mHasMultitexture = TRUE; # else mHasMultitexture = FALSE; # endif -# if GL_ARB_texture_env_combine - mHasARBEnvCombine = TRUE; +# ifdef GL_ARB_texture_env_combine + mHasARBEnvCombine = TRUE; # else mHasARBEnvCombine = FALSE; # endif -# if GL_ARB_texture_compression +# ifdef GL_ARB_texture_compression mHasCompressedTextures = TRUE; # else mHasCompressedTextures = FALSE; # endif -# if GL_ARB_vertex_buffer_object +# ifdef GL_ARB_vertex_buffer_object mHasVertexBufferObject = TRUE; # else mHasVertexBufferObject = FALSE; # endif -# if GL_EXT_framebuffer_object +# ifdef GL_EXT_framebuffer_object mHasFramebufferObject = TRUE; # else mHasFramebufferObject = FALSE; # endif -# if GL_EXT_framebuffer_multisample +# ifdef GL_EXT_framebuffer_multisample mHasFramebufferMultisample = TRUE; # else mHasFramebufferMultisample = FALSE; # endif -# if GL_ARB_draw_buffers +# ifdef GL_ARB_draw_buffers mHasDrawBuffers = TRUE; #else mHasDrawBuffers = FALSE; # endif +# if defined(GL_NV_depth_clamp) || defined(GL_ARB_depth_clamp) + mHasDepthClamp = TRUE; +#else + mHasDepthClamp = FALSE; +#endif mHasMipMapGeneration = FALSE; mHasSeparateSpecularColor = FALSE; mHasAnisotropic = FALSE; @@ -612,6 +617,7 @@ void LLGLManager::initExtensions() && ExtensionExists("GL_EXT_packed_depth_stencil", gGLHExts.mSysExts); mHasFramebufferMultisample = mHasFramebufferObject && ExtensionExists("GL_EXT_framebuffer_multisample", gGLHExts.mSysExts); mHasDrawBuffers = ExtensionExists("GL_ARB_draw_buffers", gGLHExts.mSysExts); + mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts); #if !LL_DARWIN mHasPointParameters = !mIsATI && ExtensionExists("GL_ARB_point_parameters", gGLHExts.mSysExts); #endif @@ -634,6 +640,7 @@ void LLGLManager::initExtensions() mHasFramebufferObject = FALSE; mHasFramebufferMultisample = FALSE; mHasDrawBuffers = FALSE; + mHasDepthClamp = FALSE; mHasMipMapGeneration = FALSE; mHasSeparateSpecularColor = FALSE; mHasAnisotropic = FALSE; @@ -685,10 +692,11 @@ void LLGLManager::initExtensions() if (strchr(blacklist,'q')) mHasFramebufferObject = FALSE;//S if (strchr(blacklist,'r')) mHasDrawBuffers = FALSE;//S if (strchr(blacklist,'s')) mHasFramebufferMultisample = FALSE; + if (strchr(blacklist,'t')) mHasDepthClamp = FALSE; } #endif // LL_LINUX || LL_SOLARIS - + if (!mHasMultitexture) { LL_INFOS("RenderInit") << "Couldn't initialize multitexturing" << LL_ENDL; @@ -1773,7 +1781,7 @@ LLGLDepthTest::~LLGLDepthTest() } } -LLGLClampToFarClip::LLGLClampToFarClip(glh::matrix4f P) +LLGLSquashToFarClip::LLGLSquashToFarClip(glh::matrix4f P) { for (U32 i = 0; i < 4; i++) { @@ -1786,7 +1794,7 @@ LLGLClampToFarClip::LLGLClampToFarClip(glh::matrix4f P) glMatrixMode(GL_MODELVIEW); } -LLGLClampToFarClip::~LLGLClampToFarClip() +LLGLSquashToFarClip::~LLGLSquashToFarClip() { glMatrixMode(GL_PROJECTION); glPopMatrix(); diff --git a/linden/indra/llrender/llgl.h b/linden/indra/llrender/llgl.h index 00ff1e2..cc7ebff 100644 --- a/linden/indra/llrender/llgl.h +++ b/linden/indra/llrender/llgl.h @@ -88,6 +88,7 @@ public: BOOL mHasOcclusionQuery; BOOL mHasPointParameters; BOOL mHasDrawBuffers; + BOOL mHasDepthClamp; // Other extensions. BOOL mHasAnisotropic; @@ -306,11 +307,11 @@ private: leaves this class. Does not stack. */ -class LLGLClampToFarClip +class LLGLSquashToFarClip { public: - LLGLClampToFarClip(glh::matrix4f projection); - ~LLGLClampToFarClip(); + LLGLSquashToFarClip(glh::matrix4f projection); + ~LLGLSquashToFarClip(); }; /* diff --git a/linden/indra/llrender/llglheaders.h b/linden/indra/llrender/llglheaders.h index c7178a5..9e3ae9d 100644 --- a/linden/indra/llrender/llglheaders.h +++ b/linden/indra/llrender/llglheaders.h @@ -819,5 +819,15 @@ extern void glGetBufferPointervARB (GLenum, GLenum, GLvoid* *); #endif // LL_MESA / LL_WINDOWS / LL_DARWIN +// Even when GL_ARB_depth_clamp is available in the driver, the (correct) +// headers, and therefore GL_DEPTH_CLAMP might not be defined. +// In that case GL_DEPTH_CLAMP_NV should be defined, but why not just +// use the known numeric. +// +// To avoid #ifdef's in the code. Just define this here. +#ifndef GL_DEPTH_CLAMP +// Probably (still) called GL_DEPTH_CLAMP_NV. +#define GL_DEPTH_CLAMP 0x864F +#endif #endif // LL_LLGLHEADERS_H diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index bd4e05c..966b1af 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -9840,6 +9840,17 @@ Value 0 + RenderWaterVoidCulling + + Comment + Cull void water objects when off-screen. + Persist + 1 + Type + Boolean + Value + 1 + RotateRight Comment diff --git a/linden/indra/newview/lldrawable.cpp b/linden/indra/newview/lldrawable.cpp index 14aa38a..494ac5b 100644 --- a/linden/indra/newview/lldrawable.cpp +++ b/linden/indra/newview/lldrawable.cpp @@ -361,6 +361,8 @@ void LLDrawable::makeActive() { U32 pcode = mVObjp->getPCode(); if (pcode == LLViewerObject::LL_VO_WATER || + pcode == LLViewerObject::LL_VO_HOLE_WATER || + pcode == LLViewerObject::LL_VO_EDGE_WATER || pcode == LLViewerObject::LL_VO_SURFACE_PATCH || pcode == LLViewerObject::LL_VO_PART_GROUP || pcode == LLViewerObject::LL_VO_HUD_PART_GROUP || diff --git a/linden/indra/newview/lldrawpool.cpp b/linden/indra/newview/lldrawpool.cpp index e1bf1ed..3421731 100644 --- a/linden/indra/newview/lldrawpool.cpp +++ b/linden/indra/newview/lldrawpool.cpp @@ -95,6 +95,7 @@ LLDrawPool *LLDrawPool::createPool(const U32 type, LLViewerImage *tex0) case POOL_SKY: poolp = new LLDrawPoolSky(); break; + case POOL_VOIDWATER: case POOL_WATER: poolp = new LLDrawPoolWater(); break; diff --git a/linden/indra/newview/lldrawpool.h b/linden/indra/newview/lldrawpool.h index 87c3cca..f8c2ead 100644 --- a/linden/indra/newview/lldrawpool.h +++ b/linden/indra/newview/lldrawpool.h @@ -63,6 +63,7 @@ public: POOL_BUMP, POOL_INVISIBLE, POOL_AVATAR, + POOL_VOIDWATER, POOL_WATER, POOL_GLOW, POOL_ALPHA, diff --git a/linden/indra/newview/lldrawpoolground.cpp b/linden/indra/newview/lldrawpoolground.cpp index 889b494..c65524b 100644 --- a/linden/indra/newview/lldrawpoolground.cpp +++ b/linden/indra/newview/lldrawpoolground.cpp @@ -74,7 +74,7 @@ void LLDrawPoolGround::render(S32 pass) LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); - LLGLClampToFarClip far_clip(glh_get_current_projection()); + LLGLSquashToFarClip far_clip(glh_get_current_projection()); F32 water_height = gAgent.getRegion()->getWaterHeight(); glPushMatrix(); diff --git a/linden/indra/newview/lldrawpoolsky.cpp b/linden/indra/newview/lldrawpoolsky.cpp index f0ed380..bed1030 100644 --- a/linden/indra/newview/lldrawpoolsky.cpp +++ b/linden/indra/newview/lldrawpoolsky.cpp @@ -101,7 +101,7 @@ void LLDrawPoolSky::render(S32 pass) LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); - LLGLClampToFarClip far_clip(glh_get_current_projection()); + LLGLSquashToFarClip far_clip(glh_get_current_projection()); LLGLEnable fog_enable( (mVertexShaderLevel < 1 && LLViewerCamera::getInstance()->cameraUnderWater()) ? GL_FOG : 0); diff --git a/linden/indra/newview/lldrawpoolwater.cpp b/linden/indra/newview/lldrawpoolwater.cpp index ce3425d..81e1c68 100644 --- a/linden/indra/newview/lldrawpoolwater.cpp +++ b/linden/indra/newview/lldrawpoolwater.cpp @@ -523,6 +523,7 @@ void LLDrawPoolWater::shade() glColor4fv(water_color.mV); { + LLGLEnable depth_clamp(gGLManager.mHasDepthClamp ? GL_DEPTH_CLAMP : 0); LLGLDisable cullface(GL_CULL_FACE); for (std::vector::iterator iter = mDrawFace.begin(); iter != mDrawFace.end(); iter++) @@ -538,24 +539,20 @@ void LLDrawPoolWater::shade() gGL.getTexUnit(diffTex)->bind(face->getTexture()); sNeedsReflectionUpdate = TRUE; - - if (water->getUseTexture()) + + if (water->getUseTexture() || !water->isEdgeWater()) { sNeedsDistortionUpdate = TRUE; face->renderIndexed(); } + else if (gGLManager.mHasDepthClamp) + { + face->renderIndexed(); + } else - { //smash background faces to far clip plane - if (water->getIsEdgePatch()) - { - LLGLClampToFarClip far_clip(glh_get_current_projection()); - face->renderIndexed(); - } - else - { - sNeedsDistortionUpdate = TRUE; - face->renderIndexed(); - } + { + LLGLSquashToFarClip far_clip(glh_get_current_projection()); + face->renderIndexed(); } } } diff --git a/linden/indra/newview/lldrawpoolwlsky.cpp b/linden/indra/newview/lldrawpoolwlsky.cpp index 6ff65c7..451d08e 100644 --- a/linden/indra/newview/lldrawpoolwlsky.cpp +++ b/linden/indra/newview/lldrawpoolwlsky.cpp @@ -269,7 +269,7 @@ void LLDrawPoolWLSky::render(S32 pass) LLGLDepthTest depth(GL_TRUE, GL_FALSE); LLGLDisable clip(GL_CLIP_PLANE0); - LLGLClampToFarClip far_clip(glh_get_current_projection()); + LLGLSquashToFarClip far_clip(glh_get_current_projection()); renderSkyHaze(camHeightLocal); diff --git a/linden/indra/newview/llfloatergodtools.cpp b/linden/indra/newview/llfloatergodtools.cpp index 2bbbc65..461dfe2 100644 --- a/linden/indra/newview/llfloatergodtools.cpp +++ b/linden/indra/newview/llfloatergodtools.cpp @@ -252,13 +252,6 @@ void LLFloaterGodTools::onTabChanged(void* data, bool from_click) // static void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg) { - LLHost host = msg->getSender(); - if (host != gAgent.getRegionHost()) - { - // update is for a different region than the one we're in - return; - } - //const S32 SIM_NAME_BUF = 256; U32 region_flags; U8 sim_access; @@ -276,6 +269,8 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg) S32 redirect_grid_y; LLUUID cache_id; + LLHost host = msg->getSender(); + msg->getStringFast(_PREHASH_RegionInfo, _PREHASH_SimName, sim_name); msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_EstateID, estate_id); msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_ParentEstateID, parent_estate_id); @@ -285,6 +280,15 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg) msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_ObjectBonusFactor, object_bonus_factor); msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_BillableFactor, billable_factor); msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_WaterHeight, water_height); + + if (host != gAgent.getRegionHost()) + { + // Update is for a different region than the one we're in. + // Just check for a waterheight change. + LLWorld::getInstance()->waterHeightRegionInfo(sim_name, water_height); + return; + } + msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainRaiseLimit, terrain_raise_limit); msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainLowerLimit, terrain_lower_limit); msg->getS32Fast(_PREHASH_RegionInfo, _PREHASH_PricePerMeter, price_per_meter); diff --git a/linden/indra/newview/llspatialpartition.cpp b/linden/indra/newview/llspatialpartition.cpp index 31b537c..01ed375 100644 --- a/linden/indra/newview/llspatialpartition.cpp +++ b/linden/indra/newview/llspatialpartition.cpp @@ -1302,7 +1302,11 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera) { if (mSpatialPartition->isOcclusionEnabled() && LLPipeline::sUseOcclusion > 1) { - if (earlyFail(camera, this)) + static LLCachedControl render_water_void_culling("RenderWaterVoidCulling", TRUE); + // Don't cull hole/edge water, unless RenderWaterVoidCulling is set and we have the GL_ARB_depth_clamp extension. + if ((mSpatialPartition->mDrawableType == LLPipeline::RENDER_TYPE_VOIDWATER && + !(render_water_void_culling && gGLManager.mHasDepthClamp)) || + earlyFail(camera, this)) { setState(LLSpatialGroup::DISCARD_QUERY); assert_states_valid(this); @@ -1324,11 +1328,28 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera) buildOcclusion(); } + // Depth clamp all water to avoid it being culled as a result of being + // behind the far clip plane, and in the case of edge water to avoid + // it being culled while still visible. + bool const use_depth_clamp = + gGLManager.mHasDepthClamp && + (mSpatialPartition->mDrawableType == LLPipeline::RENDER_TYPE_WATER || + mSpatialPartition->mDrawableType == LLPipeline::RENDER_TYPE_VOIDWATER); + if (use_depth_clamp) + { + glEnable(GL_DEPTH_CLAMP); + } + glBeginQueryARB(GL_SAMPLES_PASSED_ARB, mOcclusionQuery); glVertexPointer(3, GL_FLOAT, 0, mOcclusionVerts); glDrawRangeElements(GL_TRIANGLE_FAN, 0, 7, 8, GL_UNSIGNED_BYTE, get_box_fan_indices(camera, mBounds[0])); glEndQueryARB(GL_SAMPLES_PASSED_ARB); + + if (use_depth_clamp) + { + glDisable(GL_DEPTH_CLAMP); + } } setState(LLSpatialGroup::QUERY_PENDING); @@ -2280,9 +2301,11 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE) gGL.color4f(0.5f,0.5f,0.5f,1.0f); break; case LLViewerObject::LL_VO_PART_GROUP: - case LLViewerObject::LL_VO_HUD_PART_GROUP: + case LLViewerObject::LL_VO_HUD_PART_GROUP: gGL.color4f(0,0,1,1); break; + case LLViewerObject::LL_VO_EDGE_WATER: + case LLViewerObject::LL_VO_HOLE_WATER: case LLViewerObject::LL_VO_WATER: gGL.color4f(0,0.5f,1,1); break; diff --git a/linden/indra/newview/llspatialpartition.h b/linden/indra/newview/llspatialpartition.h index df96152..be0163b 100644 --- a/linden/indra/newview/llspatialpartition.h +++ b/linden/indra/newview/llspatialpartition.h @@ -481,7 +481,6 @@ private: drawinfo_list_t mRenderMap[LLRenderPass::NUM_RENDER_TYPES]; }; - //spatial partition for water (implemented in LLVOWater.cpp) class LLWaterPartition : public LLSpatialPartition { @@ -491,6 +490,13 @@ public: virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { } }; +//spatial partition for hole and edge water (implemented in LLVOWater.cpp) +class LLVoidWaterPartition : public LLWaterPartition +{ +public: + LLVoidWaterPartition(); +}; + //spatial partition for terrain (impelmented in LLVOSurfacePatch.cpp) class LLTerrainPartition : public LLSpatialPartition { diff --git a/linden/indra/newview/llsurface.cpp b/linden/indra/newview/llsurface.cpp index a27f0e2..caaba05 100644 --- a/linden/indra/newview/llsurface.cpp +++ b/linden/indra/newview/llsurface.cpp @@ -1167,8 +1167,13 @@ void LLSurface::setWaterHeight(F32 height) if (!mWaterObjp.isNull()) { LLVector3 water_pos_region = mWaterObjp->getPositionRegion(); + bool changed = water_pos_region.mV[VZ] != height; water_pos_region.mV[VZ] = height; mWaterObjp->setPositionRegion(water_pos_region); + if (changed) + { + LLWorld::getInstance()->updateWaterObjects(); + } } else { diff --git a/linden/indra/newview/llviewerdisplay.cpp b/linden/indra/newview/llviewerdisplay.cpp index ad186d5..5316337 100644 --- a/linden/indra/newview/llviewerdisplay.cpp +++ b/linden/indra/newview/llviewerdisplay.cpp @@ -602,7 +602,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gFrameStats.start(LLFrameStats::UPDATE_CULL); S32 water_clip = 0; if ((LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_ENVIRONMENT) > 1) && - gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_WATER)) + (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_WATER) || + gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_VOIDWATER))) { if (LLViewerCamera::getInstance()->cameraUnderWater()) { diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp index a854583..f3353bb 100644 --- a/linden/indra/newview/llviewerobject.cpp +++ b/linden/indra/newview/llviewerobject.cpp @@ -144,6 +144,9 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco res = new LLVOSurfacePatch(id, pcode, regionp); break; case LL_VO_SKY: res = new LLVOSky(id, pcode, regionp); break; + case LL_VO_EDGE_WATER: + case LL_VO_HOLE_WATER: + res = new LLVOVoidWater(id, pcode, regionp); break; case LL_VO_WATER: res = new LLVOWater(id, pcode, regionp); break; case LL_VO_GROUND: diff --git a/linden/indra/newview/llviewerobject.h b/linden/indra/newview/llviewerobject.h index 7f8bd63..c443441 100644 --- a/linden/indra/newview/llviewerobject.h +++ b/linden/indra/newview/llviewerobject.h @@ -506,15 +506,16 @@ public: { LL_VO_CLOUDS = LL_PCODE_APP | 0x20, LL_VO_SURFACE_PATCH = LL_PCODE_APP | 0x30, - //LL_VO_STARS = LL_PCODE_APP | 0x40, + LL_VO_WL_SKY = LL_PCODE_APP | 0x40, LL_VO_SQUARE_TORUS = LL_PCODE_APP | 0x50, LL_VO_SKY = LL_PCODE_APP | 0x60, - LL_VO_WATER = LL_PCODE_APP | 0x70, - LL_VO_GROUND = LL_PCODE_APP | 0x80, - LL_VO_PART_GROUP = LL_PCODE_APP | 0x90, - LL_VO_TRIANGLE_TORUS = LL_PCODE_APP | 0xa0, - LL_VO_WL_SKY = LL_PCODE_APP | 0xb0, // should this be moved to 0x40? - LL_VO_HUD_PART_GROUP = LL_PCODE_APP | 0xc0, + LL_VO_EDGE_WATER = LL_PCODE_APP | 0x70, + LL_VO_HOLE_WATER = LL_PCODE_APP | 0x80, + LL_VO_WATER = LL_PCODE_APP | 0x90, + LL_VO_GROUND = LL_PCODE_APP | 0xa0, + LL_VO_PART_GROUP = LL_PCODE_APP | 0xb0, + LL_VO_TRIANGLE_TORUS = LL_PCODE_APP | 0xc0, + LL_VO_HUD_PART_GROUP = LL_PCODE_APP | 0xd0, } EVOType; LLUUID mID; @@ -713,8 +714,8 @@ public: class LLStaticViewerObject : public LLViewerObject { public: - LLStaticViewerObject(const LLUUID& id, const LLPCode type, LLViewerRegion* regionp, BOOL is_global = FALSE) - : LLViewerObject(id,type,regionp, is_global) + LLStaticViewerObject(const LLUUID& id, const LLPCode pcode, LLViewerRegion* regionp, BOOL is_global = FALSE) + : LLViewerObject(id, pcode, regionp, is_global) { } virtual void updateDrawable(BOOL force_damped); diff --git a/linden/indra/newview/llviewerregion.cpp b/linden/indra/newview/llviewerregion.cpp index 4257f70..4fd3bfb 100644 --- a/linden/indra/newview/llviewerregion.cpp +++ b/linden/indra/newview/llviewerregion.cpp @@ -215,6 +215,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, //MUST MATCH declaration of eObjectPartitions mObjectPartition.push_back(new LLHUDPartition()); //PARTITION_HUD mObjectPartition.push_back(new LLTerrainPartition()); //PARTITION_TERRAIN + mObjectPartition.push_back(new LLVoidWaterPartition()); //PARTITION_VOIDWATER mObjectPartition.push_back(new LLWaterPartition()); //PARTITION_WATER mObjectPartition.push_back(new LLTreePartition()); //PARTITION_TREE mObjectPartition.push_back(new LLParticlePartition()); //PARTITION_PARTICLE diff --git a/linden/indra/newview/llviewerregion.h b/linden/indra/newview/llviewerregion.h index b0a98a9..09280a5 100644 --- a/linden/indra/newview/llviewerregion.h +++ b/linden/indra/newview/llviewerregion.h @@ -75,6 +75,7 @@ public: { PARTITION_HUD=0, PARTITION_TERRAIN, + PARTITION_VOIDWATER, PARTITION_WATER, PARTITION_TREE, PARTITION_PARTICLE, diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index eb8977c..43a0d19 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp @@ -1303,6 +1303,11 @@ LLViewerWindow::LLViewerWindow( gSavedSettings.setBOOL("ProbeHardwareOnStartup", FALSE); } + if (!gGLManager.mHasDepthClamp) + { + LL_INFOS("RenderInit") << "Missing feature GL_ARB_depth_clamp. Void water might disappear in rare cases." << LL_ENDL; + } + // If we crashed while initializng GL stuff last time, disable certain features if (gSavedSettings.getBOOL("RenderInitError")) { diff --git a/linden/indra/newview/llvosurfacepatch.cpp b/linden/indra/newview/llvosurfacepatch.cpp index d86f758..1671880 100644 --- a/linden/indra/newview/llvosurfacepatch.cpp +++ b/linden/indra/newview/llvosurfacepatch.cpp @@ -86,7 +86,7 @@ public: //============================================================================ LLVOSurfacePatch::LLVOSurfacePatch(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) - : LLStaticViewerObject(id, LL_VO_SURFACE_PATCH, regionp), + : LLStaticViewerObject(id, pcode, regionp), mDirtiedPatch(FALSE), mPool(NULL), mBaseComp(0), diff --git a/linden/indra/newview/llvowater.cpp b/linden/indra/newview/llvowater.cpp index 5b6a949..7e9470a 100644 --- a/linden/indra/newview/llvowater.cpp +++ b/linden/indra/newview/llvowater.cpp @@ -70,17 +70,16 @@ const F32 WAVE_STEP_INV = (1. / WAVE_STEP); LLVOWater::LLVOWater(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) -: LLStaticViewerObject(id, LL_VO_WATER, regionp) +: LLStaticViewerObject(id, pcode, regionp) { // Terrain must draw during selection passes so it can block objects behind it. mbCanSelect = FALSE; setScale(LLVector3(256.f, 256.f, 0.f)); // Hack for setting scale for bounding boxes/visibility. mUseTexture = TRUE; - mIsEdgePatch = FALSE; + mRenderType = LLPipeline::RENDER_TYPE_WATER; } - void LLVOWater::markDead() { LLViewerObject::markDead(); @@ -123,7 +122,7 @@ LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline) { pipeline->allocDrawable(this); mDrawable->setLit(FALSE); - mDrawable->setRenderType(LLPipeline::RENDER_TYPE_WATER); + mDrawable->setRenderType(mRenderType); LLDrawPoolWater *pool = (LLDrawPoolWater*) gPipeline.getPool(LLDrawPool::POOL_WATER); @@ -254,11 +253,6 @@ void LLVOWater::setUseTexture(const BOOL use_texture) mUseTexture = use_texture; } -void LLVOWater::setIsEdgePatch(const BOOL edge_patch) -{ - mIsEdgePatch = edge_patch; -} - void LLVOWater::updateSpatialExtents(LLVector3 &newMin, LLVector3& newMax) { LLVector3 pos = getPositionAgent(); @@ -271,8 +265,13 @@ void LLVOWater::updateSpatialExtents(LLVector3 &newMin, LLVector3& newMax) } U32 LLVOWater::getPartitionType() const -{ - return LLViewerRegion::PARTITION_WATER; +{ + return LLViewerRegion::PARTITION_WATER; +} + +U32 LLVOVoidWater::getPartitionType() const +{ + return LLViewerRegion::PARTITION_VOIDWATER; } LLWaterPartition::LLWaterPartition() @@ -283,3 +282,9 @@ LLWaterPartition::LLWaterPartition() mDrawableType = LLPipeline::RENDER_TYPE_WATER; mPartitionType = LLViewerRegion::PARTITION_WATER; } + +LLVoidWaterPartition::LLVoidWaterPartition() +{ + mDrawableType = LLPipeline::RENDER_TYPE_VOIDWATER; + mPartitionType = LLViewerRegion::PARTITION_VOIDWATER; +} diff --git a/linden/indra/newview/llvowater.h b/linden/indra/newview/llvowater.h index 9c33e74..37480b6 100644 --- a/linden/indra/newview/llvowater.h +++ b/linden/indra/newview/llvowater.h @@ -35,6 +35,7 @@ #include "llviewerobject.h" #include "llviewerimage.h" +#include "pipeline.h" #include "v2math.h" const U32 N_RES = 16; //32 // number of subdivisions of wave tile @@ -71,18 +72,29 @@ public: /*virtual*/ void updateTextures(); /*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); // generate accurate apparent angle and area - virtual U32 getPartitionType() const; + /*virtual*/ U32 getPartitionType() const; /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. void setUseTexture(const BOOL use_texture); - void setIsEdgePatch(const BOOL edge_patch); BOOL getUseTexture() const { return mUseTexture; } - BOOL getIsEdgePatch() const { return mIsEdgePatch; } + + bool isEdgeWater(void) const { return mPrimitiveCode == LL_VO_EDGE_WATER; } protected: BOOL mUseTexture; - BOOL mIsEdgePatch; + LLPipeline::LLRenderTypeMask mRenderType; +}; + +class LLVOVoidWater : public LLVOWater +{ +public: + LLVOVoidWater(LLUUID const& id, LLPCode pcode, LLViewerRegion* regionp) : LLVOWater(id, pcode, regionp) + { + mRenderType = LLPipeline::RENDER_TYPE_VOIDWATER; + } + + /*virtual*/ U32 getPartitionType() const; }; #endif // LL_VOSURFACEPATCH_H diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp index 90ab49b..5026808 100644 --- a/linden/indra/newview/llworld.cpp +++ b/linden/indra/newview/llworld.cpp @@ -61,6 +61,12 @@ #include "llappviewer.h" // for do_disconnect() #include "hippoLimits.h" + +#include +#include +#include +#include + // // Globals // @@ -810,10 +816,69 @@ F32 LLWorld::getLandFarClip() const void LLWorld::setLandFarClip(const F32 far_clip) { + static S32 const rwidth = (S32)REGION_WIDTH_U32; + S32 const n1 = (llceil(mLandFarClip) - 1) / rwidth; + S32 const n2 = (llceil(far_clip) - 1) / rwidth; + bool need_water_objects_update = n1 != n2; + mLandFarClip = far_clip; + + if (need_water_objects_update) + { + updateWaterObjects(); + } } +// Some region that we're connected to, but not the one we're in, gave us +// a (possibly) new water height. Update it in our local copy. +void LLWorld::waterHeightRegionInfo(std::string const& sim_name, F32 water_height) +{ + for (region_list_t::iterator iter = mRegionList.begin(); iter != mRegionList.end(); ++iter) + { + if ((*iter)->getName() == sim_name) + { + (*iter)->setWaterHeight(water_height); + break; + } + } +} +// There are three types of water objects: +// Region water objects: the water in a region. +// Hole water objects: water in the void but within current draw distance. +// Edge water objects: the water outside the draw distance, up till the horizon. +// +// For example: +// +// -----------------------horizon------------------------- +// | | | | +// | Edge Water | | | +// | | | | +// | | | | +// | | | | +// | | | | +// | | rwidth | | +// | | <-----> | | +// ------------------------------------------------------- +// | |Hole |other| | | +// | |Water|reg. | | | +// | |-----------------| | +// | |other|cur. |<--> | | +// | |reg. | reg.| \__|_ draw distance | +// | |-----------------| | +// | | | |<--->| | +// | | | | \__|_ range | +// ------------------------------------------------------- +// | |<----width------>|<--horizon ext.->| +// | | | | +// | | | | +// | | | | +// | | | | +// | | | | +// | | | | +// | | | | +// ------------------------------------------------------- +// void LLWorld::updateWaterObjects() { if (!gAgent.getRegion()) @@ -826,128 +891,264 @@ void LLWorld::updateWaterObjects() return; } - // First, determine the min and max "box" of water objects - S32 min_x = 0; - S32 min_y = 0; - S32 max_x = 0; - S32 max_y = 0; + // Region width in meters. + S32 const rwidth = (S32)REGION_WIDTH_U32; + + // The distance we might see into the void + // when standing on the edge of a region, in meters. + S32 const draw_distance = llceil(mLandFarClip); + + // We can only have "holes" in the water (where there no region) if we + // can have existing regions around it. Taking into account that this + // code is only executed when we enter a region, and not when we walk + // around in it, we (only) need to take into account regions that fall + // within the draw_distance. + // + // Set 'range' to draw_distance, rounded up to the nearest multiple of rwidth. + S32 const nsims = (draw_distance + rwidth - 1) / rwidth; + S32 const range = nsims * rwidth; + + // Get South-West corner of current region. + LLViewerRegion const* regionp = gAgent.getRegion(); U32 region_x, region_y; - - S32 rwidth = 256; - - // We only want to fill in water for stuff that's near us, say, within 256 or 512m - S32 range = LLViewerCamera::getInstance()->getFar() > 256.f ? 512 : 256; - - LLViewerRegion* regionp = gAgent.getRegion(); from_region_handle(regionp->getHandle(), ®ion_x, ®ion_y); - min_x = (S32)region_x - range; - min_y = (S32)region_y - range; - max_x = (S32)region_x + range; - max_y = (S32)region_y + range; + // The min. and max. coordinates of the South-West corners of the Hole water objects. + S32 const min_x = (S32)region_x - range; + S32 const min_y = (S32)region_y - range; + S32 const max_x = (S32)region_x + range; + S32 const max_y = (S32)region_y + range; + + // Attempt to determine a sensible water height for all the + // Hole Water objects. + // + // It make little sense to try to guess what the best water + // height should be when that isn't completely obvious: if it's + // impossible to satisfy every region's water height without + // getting a jump in the water height. + // + // In order to keep the reasoning simple, we assume something + // logical as a group of connected regions, where the coastline + // is at the outer edge. Anything more complex that would "break" + // under such an assumption would probably break anyway (would + // depend on terrain editing and existing mega prims, say, if + // anything would make sense at all). + // + // So, what we do is find all connected regions within the + // draw distance that border void, and then pick the lowest + // water height of those (coast) regions. + S32 const n = 2 * nsims + 1; + S32 const origin = nsims + nsims * n; + std::vector water_heights(n * n); + std::vector checked(n * n, 0); // index = nx + ny * n + origin; + U8 const region_bit = 1; + U8 const hole_bit = 2; + U8 const bordering_hole_bit = 4; + U8 const bordering_edge_bit = 8; + // Use the legacy waterheight for the Edge water in the case + // that we don't find any Hole water at all. + F32 water_height = DEFAULT_WATER_HEIGHT; + int max_count = 0; + LL_DEBUGS("WaterHeight") << "Current region: " << regionp->getName() << "; water height: " << regionp->getWaterHeight() << " m." << LL_ENDL; + std::map water_height_counts; + typedef std::queue, std::deque > > nxny_pairs_type; + nxny_pairs_type nxny_pairs; + nxny_pairs.push(nxny_pairs_type::value_type(0, 0)); + water_heights[origin] = regionp->getWaterHeight(); + checked[origin] = region_bit; + // For debugging purposes. + int number_of_connected_regions = 1; + int uninitialized_regions = 0; + int bordering_hole = 0; + int bordering_edge = 0; + while(!nxny_pairs.empty()) + { + S32 const nx = nxny_pairs.front().first; + S32 const ny = nxny_pairs.front().second; + LL_DEBUGS("WaterHeight") << "nx,ny = " << nx << "," << ny << LL_ENDL; + S32 const index = nx + ny * n + origin; + nxny_pairs.pop(); + for (S32 dir = 0; dir < 4; ++dir) + { + S32 const cnx = nx + gDirAxes[dir][0]; + S32 const cny = ny + gDirAxes[dir][1]; + LL_DEBUGS("WaterHeight") << "dir = " << dir << "; cnx,cny = " << cnx << "," << cny << LL_ENDL; + S32 const cindex = cnx + cny * n + origin; + bool is_hole = false; + bool is_edge = false; + LLViewerRegion* new_region_found = NULL; + if (cnx < -nsims || cnx > nsims || + cny < -nsims || cny > nsims) + { + LL_DEBUGS("WaterHeight") << " Edge Water!" << LL_ENDL; + // Bumped into Edge water object. + is_edge = true; + } + else if (checked[cindex]) + { + LL_DEBUGS("WaterHeight") << " Already checked before!" << LL_ENDL; + // Already checked. + is_hole = (checked[cindex] & hole_bit); + } + else + { + S32 x = (S32)region_x + cnx * rwidth; + S32 y = (S32)region_y + cny * rwidth; + U64 region_handle = to_region_handle(x, y); + new_region_found = getRegionFromHandle(region_handle); + is_hole = !new_region_found; + checked[cindex] = is_hole ? hole_bit : region_bit; + } + if (is_hole) + { + // This was a region that borders at least one 'hole'. + // Count the found coastline. + F32 new_water_height = water_heights[index]; + LL_DEBUGS("WaterHeight") << " This is void; counting coastline with water height of " << new_water_height << LL_ENDL; + S32 new_water_height_cm = llround(new_water_height * 100); + int count = (water_height_counts[new_water_height_cm] += 1); + // Just use the lowest water height: this is mainly about the horizon water, + // and whatever we do, we don't want it to be possible to look under the water + // when looking in the distance: it is better to make a step downwards in water + // height when going away from the avie than a step upwards. However, since + // everyone is used to DEFAULT_WATER_HEIGHT, don't allow a single region + // to drag the water level below DEFAULT_WATER_HEIGHT on it's own. + if (bordering_hole == 0 || // First time we get here. + (new_water_height >= DEFAULT_WATER_HEIGHT && + new_water_height < water_height) || + (new_water_height < DEFAULT_WATER_HEIGHT && + count > max_count) + ) + { + water_height = new_water_height; + } + if (count > max_count) + { + max_count = count; + } + if (!(checked[index] & bordering_hole_bit)) + { + checked[index] |= bordering_hole_bit; + ++bordering_hole; + } + } + else if (is_edge && !(checked[index] & bordering_edge_bit)) + { + checked[index] |= bordering_edge_bit; + ++bordering_edge; + } + if (!new_region_found) + { + // Dead end, there is no region here. + continue; + } + // Found a new connected region. + ++number_of_connected_regions; + if (new_region_found->getName().empty()) + { + // Uninitialized LLViewerRegion, don't use it's water height. + LL_DEBUGS("WaterHeight") << " Uninitialized region." << LL_ENDL; + ++uninitialized_regions; + continue; + } + nxny_pairs.push(nxny_pairs_type::value_type(cnx, cny)); + water_heights[cindex] = new_region_found->getWaterHeight(); + LL_DEBUGS("WaterHeight") << " Found a new region (name: " << new_region_found->getName() << "; water height: " << water_heights[cindex] << " m)!" << LL_ENDL; + } + } + llinfos << "Number of connected regions: " << number_of_connected_regions << " (" << uninitialized_regions << + " uninitialized); number of regions bordering Hole water: " << bordering_hole << + "; number of regions bordering Edge water: " << bordering_edge << llendl; + llinfos << "Coastline count (height, count): "; + bool first = true; + for (std::map::iterator iter = water_height_counts.begin(); iter != water_height_counts.end(); ++iter) + { + if (!first) llcont << ", "; + llcont << "(" << (iter->first / 100.f) << ", " << iter->second << ")"; + first = false; + } + llcont << llendl; + llinfos << "Water height used for Hole and Edge water objects: " << water_height << llendl; - F32 height = 0.f; - - for (region_list_t::iterator iter = mRegionList.begin(); - iter != mRegionList.end(); ++iter) + // Update all Region water objects. + for (region_list_t::iterator iter = mRegionList.begin(); iter != mRegionList.end(); ++iter) { LLViewerRegion* regionp = *iter; LLVOWater* waterp = regionp->getLand().getWaterObj(); - height += regionp->getWaterHeight(); if (waterp) { gObjectList.updateActive(waterp); } } + // Clean up all existing Hole water objects. for (std::list::iterator iter = mHoleWaterObjects.begin(); - iter != mHoleWaterObjects.end(); ++ iter) + iter != mHoleWaterObjects.end(); ++iter) { LLVOWater* waterp = *iter; gObjectList.killObject(waterp); } mHoleWaterObjects.clear(); - // Now, get a list of the holes - S32 x, y; - for (x = min_x; x <= max_x; x += rwidth) + // Let the Edge and Hole water boxes be 1024 meter high so that they + // are never too small to be drawn (A LL_VO_*_WATER box has water + // rendered on it's bottom surface only), and put their bottom at + // the current regions water height. + F32 const box_height = 1024; + F32 const water_center_z = water_height + box_height / 2; + + // Create new Hole water objects within 'range' where there is no region. + for (S32 x = min_x; x <= max_x; x += rwidth) { - for (y = min_y; y <= max_y; y += rwidth) + for (S32 y = min_y; y <= max_y; y += rwidth) { U64 region_handle = to_region_handle(x, y); if (!getRegionFromHandle(region_handle)) { - LLVOWater* waterp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, gAgent.getRegion()); + LLVOWater* waterp = (LLVOWater*)gObjectList.createObjectViewer(LLViewerObject::LL_VO_HOLE_WATER, gAgent.getRegion()); waterp->setUseTexture(FALSE); - waterp->setPositionGlobal(LLVector3d(x + rwidth/2, - y + rwidth/2, - 256.f+DEFAULT_WATER_HEIGHT)); - waterp->setScale(LLVector3((F32)rwidth, (F32)rwidth, 512.f)); + waterp->setPositionGlobal(LLVector3d(x + rwidth / 2, y + rwidth / 2, water_center_z)); + waterp->setScale(LLVector3((F32)rwidth, (F32)rwidth, box_height)); gPipeline.createObject(waterp); mHoleWaterObjects.push_back(waterp); } } } - // Update edge water objects - S32 wx, wy; - S32 center_x, center_y; - wx = (max_x - min_x) + rwidth; - wy = (max_y - min_y) + rwidth; - center_x = min_x + (wx >> 1); - center_y = min_y + (wy >> 1); - - S32 add_boundary[4] = { - 512 - (max_x - region_x), - 512 - (max_y - region_y), - 512 - (region_x - min_x), - 512 - (region_y - min_y) }; - - S32 dir; - for (dir = 0; dir < 8; dir++) + // Center of the region. + S32 const center_x = region_x + rwidth / 2; + S32 const center_y = region_y + rwidth / 2; + // Width of the area with Hole water objects. + S32 const width = rwidth + 2 * range; + S32 const horizon_extend = 2048 + 512 - range; // Legacy value. + // The overlap is needed to get rid of sky pixels being visible between the + // Edge and Hole water object at greater distances (due to floating point + // round off errors). + S32 const edge_hole_overlap = 1; // Twice the actual overlap. + + for (S32 dir = 0; dir < 8; ++dir) { - S32 dim[2] = { 0 }; - switch (gDirAxes[dir][0]) - { - case -1: dim[0] = add_boundary[2]; break; - case 0: dim[0] = wx; break; - default: dim[0] = add_boundary[0]; break; - } - switch (gDirAxes[dir][1]) - { - case -1: dim[1] = add_boundary[3]; break; - case 0: dim[1] = wy; break; - default: dim[1] = add_boundary[1]; break; - } + // Size of the Edge water objects. + S32 const dim_x = (gDirAxes[dir][0] == 0) ? width : (horizon_extend + edge_hole_overlap); + S32 const dim_y = (gDirAxes[dir][1] == 0) ? width : (horizon_extend + edge_hole_overlap); + // And their position. + S32 const water_center_x = center_x + (width + horizon_extend) / 2 * gDirAxes[dir][0]; + S32 const water_center_y = center_y + (width + horizon_extend) / 2 * gDirAxes[dir][1]; - // Resize and reshape the water objects - const S32 water_center_x = center_x + llround((wx + dim[0]) * 0.5f * gDirAxes[dir][0]); - const S32 water_center_y = center_y + llround((wy + dim[1]) * 0.5f * gDirAxes[dir][1]); - LLVOWater* waterp = mEdgeWaterObjects[dir]; if (!waterp || waterp->isDead()) { // The edge water objects can be dead because they're attached to the region that the // agent was in when they were originally created. - mEdgeWaterObjects[dir] = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, - gAgent.getRegion()); + mEdgeWaterObjects[dir] = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_EDGE_WATER, gAgent.getRegion()); waterp = mEdgeWaterObjects[dir]; waterp->setUseTexture(FALSE); - waterp->setIsEdgePatch(TRUE); gPipeline.createObject(waterp); } waterp->setRegion(gAgent.getRegion()); - LLVector3d water_pos(water_center_x, water_center_y, - DEFAULT_WATER_HEIGHT+256.f); - LLVector3 water_scale((F32) dim[0], (F32) dim[1], 512.f); - - //stretch out to horizon - water_scale.mV[0] += fabsf(2048.f * gDirAxes[dir][0]); - water_scale.mV[1] += fabsf(2048.f * gDirAxes[dir][1]); - - water_pos.mdV[0] += 1024.f * gDirAxes[dir][0]; - water_pos.mdV[1] += 1024.f * gDirAxes[dir][1]; + LLVector3d water_pos(water_center_x, water_center_y, water_center_z); + LLVector3 water_scale((F32) dim_x, (F32) dim_y, box_height); waterp->setPositionGlobal(water_pos); waterp->setScale(water_scale); diff --git a/linden/indra/newview/llworld.h b/linden/indra/newview/llworld.h index 46aefd9..2c5815c 100644 --- a/linden/indra/newview/llworld.h +++ b/linden/indra/newview/llworld.h @@ -142,6 +142,7 @@ public: LLViewerImage *getDefaultWaterTexture(); void updateWaterObjects(); + void waterHeightRegionInfo(std::string const& sim_name, F32 water_height); void shiftRegions(const LLVector3& offset); void setSpaceTimeUSec(const U64 space_time_usec); diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp index f10aca5..e024e4c 100644 --- a/linden/indra/newview/pipeline.cpp +++ b/linden/indra/newview/pipeline.cpp @@ -1833,11 +1833,12 @@ void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags f void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) { const U32 face_mask = (1 << LLPipeline::RENDER_TYPE_AVATAR) | - (1 << LLPipeline::RENDER_TYPE_GROUND) | - (1 << LLPipeline::RENDER_TYPE_TERRAIN) | - (1 << LLPipeline::RENDER_TYPE_TREE) | - (1 << LLPipeline::RENDER_TYPE_SKY) | - (1 << LLPipeline::RENDER_TYPE_WATER); + (1 << LLPipeline::RENDER_TYPE_GROUND) | + (1 << LLPipeline::RENDER_TYPE_TERRAIN) | + (1 << LLPipeline::RENDER_TYPE_TREE) | + (1 << LLPipeline::RENDER_TYPE_SKY) | + (1 << LLPipeline::RENDER_TYPE_VOIDWATER) | + (1 << LLPipeline::RENDER_TYPE_WATER); if (mRenderTypeMask & face_mask) { @@ -4436,6 +4437,11 @@ void LLPipeline::toggleRenderType(U32 type) { U32 bit = (1<cameraUnderWater() ? FALSE : TRUE; diff --git a/linden/indra/newview/pipeline.h b/linden/indra/newview/pipeline.h index 1a32b30..3f3309a 100644 --- a/linden/indra/newview/pipeline.h +++ b/linden/indra/newview/pipeline.h @@ -314,8 +314,9 @@ public: RENDER_TYPE_AVATAR = LLDrawPool::POOL_AVATAR, RENDER_TYPE_TREE = LLDrawPool::POOL_TREE, RENDER_TYPE_INVISIBLE = LLDrawPool::POOL_INVISIBLE, + RENDER_TYPE_VOIDWATER = LLDrawPool::POOL_VOIDWATER, RENDER_TYPE_WATER = LLDrawPool::POOL_WATER, - RENDER_TYPE_ALPHA = LLDrawPool::POOL_ALPHA, + RENDER_TYPE_ALPHA = LLDrawPool::POOL_ALPHA, RENDER_TYPE_GLOW = LLDrawPool::POOL_GLOW, // Following are object types (only used in drawable mRenderType) -- cgit v1.1 From da60f7ce0c0a839802c2581b3738692771c5bcc3 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 1 May 2010 03:34:11 -0700 Subject: Applied patch by Aleric Inglewood for VWR-12984: Water flickers and disappears in patches, part 2: Also support GL_NV_depth_clamp --- linden/indra/llrender/llgl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden') diff --git a/linden/indra/llrender/llgl.cpp b/linden/indra/llrender/llgl.cpp index c08ad0d..2e9b2bd 100644 --- a/linden/indra/llrender/llgl.cpp +++ b/linden/indra/llrender/llgl.cpp @@ -617,7 +617,7 @@ void LLGLManager::initExtensions() && ExtensionExists("GL_EXT_packed_depth_stencil", gGLHExts.mSysExts); mHasFramebufferMultisample = mHasFramebufferObject && ExtensionExists("GL_EXT_framebuffer_multisample", gGLHExts.mSysExts); mHasDrawBuffers = ExtensionExists("GL_ARB_draw_buffers", gGLHExts.mSysExts); - mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts); + mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts) || ExtensionExists("GL_NV_depth_clamp", gGLHExts.mSysExts); #if !LL_DARWIN mHasPointParameters = !mIsATI && ExtensionExists("GL_ARB_point_parameters", gGLHExts.mSysExts); #endif -- cgit v1.1 From 7042b6caff21c678524b94ef57455563bc17fb43 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 1 May 2010 03:36:02 -0700 Subject: Applied patch by Aleric Inglewood for VWR-12984: Water flickers and disappears in patches, part 3: Collapse LL_VO_HOLE_WATER and LL_VO_EDGE_WATER into one LL_VO_VOID_WATER --- linden/indra/newview/lldrawable.cpp | 3 +-- linden/indra/newview/lldrawpoolwater.cpp | 2 +- linden/indra/newview/llspatialpartition.cpp | 3 +-- linden/indra/newview/llviewerobject.cpp | 3 +-- linden/indra/newview/llviewerobject.h | 13 ++++++------- linden/indra/newview/llvowater.cpp | 6 ++++++ linden/indra/newview/llvowater.h | 5 +++-- linden/indra/newview/llworld.cpp | 5 +++-- 8 files changed, 22 insertions(+), 18 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/lldrawable.cpp b/linden/indra/newview/lldrawable.cpp index 494ac5b..5a383bc 100644 --- a/linden/indra/newview/lldrawable.cpp +++ b/linden/indra/newview/lldrawable.cpp @@ -361,8 +361,7 @@ void LLDrawable::makeActive() { U32 pcode = mVObjp->getPCode(); if (pcode == LLViewerObject::LL_VO_WATER || - pcode == LLViewerObject::LL_VO_HOLE_WATER || - pcode == LLViewerObject::LL_VO_EDGE_WATER || + pcode == LLViewerObject::LL_VO_VOID_WATER || pcode == LLViewerObject::LL_VO_SURFACE_PATCH || pcode == LLViewerObject::LL_VO_PART_GROUP || pcode == LLViewerObject::LL_VO_HUD_PART_GROUP || diff --git a/linden/indra/newview/lldrawpoolwater.cpp b/linden/indra/newview/lldrawpoolwater.cpp index 81e1c68..624b8a8 100644 --- a/linden/indra/newview/lldrawpoolwater.cpp +++ b/linden/indra/newview/lldrawpoolwater.cpp @@ -540,7 +540,7 @@ void LLDrawPoolWater::shade() sNeedsReflectionUpdate = TRUE; - if (water->getUseTexture() || !water->isEdgeWater()) + if (water->getUseTexture() || !water->getIsEdgePatch()) { sNeedsDistortionUpdate = TRUE; face->renderIndexed(); diff --git a/linden/indra/newview/llspatialpartition.cpp b/linden/indra/newview/llspatialpartition.cpp index 01ed375..c1d5ff3 100644 --- a/linden/indra/newview/llspatialpartition.cpp +++ b/linden/indra/newview/llspatialpartition.cpp @@ -2304,8 +2304,7 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE) case LLViewerObject::LL_VO_HUD_PART_GROUP: gGL.color4f(0,0,1,1); break; - case LLViewerObject::LL_VO_EDGE_WATER: - case LLViewerObject::LL_VO_HOLE_WATER: + case LLViewerObject::LL_VO_VOID_WATER: case LLViewerObject::LL_VO_WATER: gGL.color4f(0,0.5f,1,1); break; diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp index f3353bb..cbd0472 100644 --- a/linden/indra/newview/llviewerobject.cpp +++ b/linden/indra/newview/llviewerobject.cpp @@ -144,8 +144,7 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco res = new LLVOSurfacePatch(id, pcode, regionp); break; case LL_VO_SKY: res = new LLVOSky(id, pcode, regionp); break; - case LL_VO_EDGE_WATER: - case LL_VO_HOLE_WATER: + case LL_VO_VOID_WATER: res = new LLVOVoidWater(id, pcode, regionp); break; case LL_VO_WATER: res = new LLVOWater(id, pcode, regionp); break; diff --git a/linden/indra/newview/llviewerobject.h b/linden/indra/newview/llviewerobject.h index c443441..33e8da2 100644 --- a/linden/indra/newview/llviewerobject.h +++ b/linden/indra/newview/llviewerobject.h @@ -509,13 +509,12 @@ public: LL_VO_WL_SKY = LL_PCODE_APP | 0x40, LL_VO_SQUARE_TORUS = LL_PCODE_APP | 0x50, LL_VO_SKY = LL_PCODE_APP | 0x60, - LL_VO_EDGE_WATER = LL_PCODE_APP | 0x70, - LL_VO_HOLE_WATER = LL_PCODE_APP | 0x80, - LL_VO_WATER = LL_PCODE_APP | 0x90, - LL_VO_GROUND = LL_PCODE_APP | 0xa0, - LL_VO_PART_GROUP = LL_PCODE_APP | 0xb0, - LL_VO_TRIANGLE_TORUS = LL_PCODE_APP | 0xc0, - LL_VO_HUD_PART_GROUP = LL_PCODE_APP | 0xd0, + LL_VO_VOID_WATER = LL_PCODE_APP | 0x70, + LL_VO_WATER = LL_PCODE_APP | 0x80, + LL_VO_GROUND = LL_PCODE_APP | 0x90, + LL_VO_PART_GROUP = LL_PCODE_APP | 0xa0, + LL_VO_TRIANGLE_TORUS = LL_PCODE_APP | 0xb0, + LL_VO_HUD_PART_GROUP = LL_PCODE_APP | 0xc0, } EVOType; LLUUID mID; diff --git a/linden/indra/newview/llvowater.cpp b/linden/indra/newview/llvowater.cpp index 7e9470a..c66295a 100644 --- a/linden/indra/newview/llvowater.cpp +++ b/linden/indra/newview/llvowater.cpp @@ -77,6 +77,7 @@ LLVOWater::LLVOWater(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regi setScale(LLVector3(256.f, 256.f, 0.f)); // Hack for setting scale for bounding boxes/visibility. mUseTexture = TRUE; + mIsEdgePatch = FALSE; mRenderType = LLPipeline::RENDER_TYPE_WATER; } @@ -253,6 +254,11 @@ void LLVOWater::setUseTexture(const BOOL use_texture) mUseTexture = use_texture; } +void LLVOWater::setIsEdgePatch(const BOOL edge_patch) +{ + mIsEdgePatch = edge_patch; +} + void LLVOWater::updateSpatialExtents(LLVector3 &newMin, LLVector3& newMax) { LLVector3 pos = getPositionAgent(); diff --git a/linden/indra/newview/llvowater.h b/linden/indra/newview/llvowater.h index 37480b6..55ce6d7 100644 --- a/linden/indra/newview/llvowater.h +++ b/linden/indra/newview/llvowater.h @@ -77,12 +77,13 @@ public: /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. void setUseTexture(const BOOL use_texture); + void setIsEdgePatch(const BOOL edge_patch); BOOL getUseTexture() const { return mUseTexture; } - - bool isEdgeWater(void) const { return mPrimitiveCode == LL_VO_EDGE_WATER; } + BOOL getIsEdgePatch() const { return mIsEdgePatch; } protected: BOOL mUseTexture; + BOOL mIsEdgePatch; LLPipeline::LLRenderTypeMask mRenderType; }; diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp index 5026808..17fad2b 100644 --- a/linden/indra/newview/llworld.cpp +++ b/linden/indra/newview/llworld.cpp @@ -1105,7 +1105,7 @@ void LLWorld::updateWaterObjects() U64 region_handle = to_region_handle(x, y); if (!getRegionFromHandle(region_handle)) { - LLVOWater* waterp = (LLVOWater*)gObjectList.createObjectViewer(LLViewerObject::LL_VO_HOLE_WATER, gAgent.getRegion()); + LLVOWater* waterp = (LLVOWater*)gObjectList.createObjectViewer(LLViewerObject::LL_VO_VOID_WATER, gAgent.getRegion()); waterp->setUseTexture(FALSE); waterp->setPositionGlobal(LLVector3d(x + rwidth / 2, y + rwidth / 2, water_center_z)); waterp->setScale(LLVector3((F32)rwidth, (F32)rwidth, box_height)); @@ -1140,9 +1140,10 @@ void LLWorld::updateWaterObjects() { // The edge water objects can be dead because they're attached to the region that the // agent was in when they were originally created. - mEdgeWaterObjects[dir] = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_EDGE_WATER, gAgent.getRegion()); + mEdgeWaterObjects[dir] = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_VOID_WATER, gAgent.getRegion()); waterp = mEdgeWaterObjects[dir]; waterp->setUseTexture(FALSE); + waterp->setIsEdgePatch(TRUE); // Mark that this is edge water and not hole water. gPipeline.createObject(waterp); } -- cgit v1.1 From f8f797a0e60f41b9a32aecf60b5d7a596a43fb45 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 1 May 2010 03:39:41 -0700 Subject: Moved RenderWaterVoidCulling into the Imprudence section of settings.xml --- linden/indra/newview/app_settings/settings.xml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 966b1af..aeb5c0b 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -726,6 +726,17 @@ Value 1 + RenderWaterVoidCulling + + Comment + Cull void water objects when off-screen. + Persist + 1 + Type + Boolean + Value + 1 + ResetAllPreferences Comment @@ -9840,17 +9851,6 @@ Value 0 - RenderWaterVoidCulling - - Comment - Cull void water objects when off-screen. - Persist - 1 - Type - Boolean - Value - 1 - RotateRight Comment -- cgit v1.1 From 0f41c7c6b809bf147792653d49f57c5bd49b29f4 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 25 Sep 2010 08:30:15 -0700 Subject: Revert "Updated boost 1.36 libs for Windows to support local textures (todo: update boost to at least 1.39)" since we no longer need these libs This reverts commit 4a07f267bdba86314e39bf082a9cfc5e5ad713b3. --- linden/install.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linden') diff --git a/linden/install.xml b/linden/install.xml index 6332244..82647fa 100755 --- a/linden/install.xml +++ b/linden/install.xml @@ -249,9 +249,9 @@ windows md5sum - c9b3da30d2cca5d7b9523d09937c6a1a + 094acc8173faca882ed9532e868d767f url - http://imprudenceviewer.org/download/libs/boost-1.36.0-windows-20100825.tar.bz2 + http://imprudenceviewer.org/download/libs/boost-1.36.0-windows-20091124.tar.bz2 -- cgit v1.1 From db9616811d45e168d81c8e464fb8a9cf27e51172 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Thu, 26 Aug 2010 11:04:43 -0700 Subject: Ported gSavedSettings changes from Emerald (as well as modifying a few of ours) --- linden/indra/newview/llagent.cpp | 18 ++++++++---- linden/indra/newview/llappviewer.cpp | 8 ++++-- linden/indra/newview/lldrawpoolbump.cpp | 3 +- linden/indra/newview/lldrawpoolterrain.cpp | 5 ++-- linden/indra/newview/lldrawpooltree.cpp | 8 ++++-- linden/indra/newview/llfloateractivespeakers.cpp | 4 ++- linden/indra/newview/llfloatersnapshot.cpp | 18 ++++++++---- linden/indra/newview/llfloatertools.cpp | 4 ++- linden/indra/newview/llfolderview.cpp | 19 +++++++++---- linden/indra/newview/llgroupnotify.cpp | 10 +++++-- linden/indra/newview/llhudeffectlookat.cpp | 7 +++-- linden/indra/newview/llhudeffecttrail.cpp | 8 ++++-- linden/indra/newview/llhudtext.cpp | 11 ++++++-- linden/indra/newview/llmediaremotectrl.cpp | 13 +++++---- linden/indra/newview/llnetmap.cpp | 20 ++++++++++---- linden/indra/newview/llnotify.cpp | 14 +++++++--- linden/indra/newview/lloverlaybar.cpp | 11 +++++--- linden/indra/newview/llpanelaudiovolume.cpp | 5 ++-- linden/indra/newview/llpanelavatar.cpp | 12 +++++--- linden/indra/newview/llpaneldisplay.cpp | 11 +++++--- linden/indra/newview/llprefsadvanced.cpp | 6 ++-- linden/indra/newview/llprefschat.cpp | 3 +- linden/indra/newview/llstartup.cpp | 4 ++- linden/indra/newview/llstatgraph.cpp | 4 ++- linden/indra/newview/llstatusbar.cpp | 9 ++++-- linden/indra/newview/lltexturefetch.cpp | 4 ++- linden/indra/newview/lltoolfocus.cpp | 4 ++- linden/indra/newview/llvieweraudio.cpp | 10 +++++-- linden/indra/newview/llviewermenu.cpp | 4 ++- linden/indra/newview/llviewermessage.cpp | 3 +- linden/indra/newview/llviewerobjectlist.cpp | 4 ++- linden/indra/newview/llviewerstats.cpp | 3 +- linden/indra/newview/llviewerwindow.cpp | 25 ++++++++++++----- linden/indra/newview/llvoavatar.cpp | 35 +++++++++++++++++------- linden/indra/newview/llvoiceremotectrl.cpp | 6 ++-- linden/indra/newview/llvosky.cpp | 5 +++- linden/indra/newview/llvotree.cpp | 14 ++++++---- linden/indra/newview/llvovolume.cpp | 12 ++++++-- linden/indra/newview/llvowlsky.cpp | 4 ++- linden/indra/newview/llworld.cpp | 3 +- linden/indra/newview/pipeline.cpp | 21 +++++++++----- 41 files changed, 273 insertions(+), 119 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 077da53..fc12f33 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp @@ -537,7 +537,9 @@ void LLAgent::resetView(BOOL reset_camera, BOOL change_camera) gMenuHolder->hideMenus(); } - if (change_camera && !gSavedSettings.getBOOL("FreezeTime")) + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); + + if (change_camera && !(*sFreezeTime)) { changeCameraToDefault(); @@ -561,7 +563,7 @@ void LLAgent::resetView(BOOL reset_camera, BOOL change_camera) } - if (reset_camera && !gSavedSettings.getBOOL("FreezeTime")) + if (reset_camera && !(*sFreezeTime)) { if (!gViewerWindow->getLeftMouseDown() && cameraThirdPerson()) { @@ -1976,7 +1978,9 @@ void LLAgent::cameraOrbitIn(const F32 meters) mCameraZoomFraction = (mTargetCameraDistance - meters) / camera_offset_dist; - if (!gSavedSettings.getBOOL("FreezeTime") && mCameraZoomFraction < MIN_ZOOM_FRACTION && meters > 0.f) + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); + + if (!(*sFreezeTime) && mCameraZoomFraction < MIN_ZOOM_FRACTION && meters > 0.f) { // No need to animate, camera is already there. changeCameraToMouselook(FALSE); @@ -2901,7 +2905,8 @@ static const LLFloaterView::skip_list_t& get_skip_list() { static LLFloaterView::skip_list_t skip_list; skip_list.insert(LLFloaterMap::getInstance()); - if(gSavedSettings.getBOOL("ShowStatusBarInMouselook")) + static BOOL *sShowStatusBarInMouselook = rebind_llcontrol("ShowStatusBarInMouselook", &gSavedSettings, true); + if(*sShowStatusBarInMouselook) { skip_list.insert(LLFloaterStats::getInstance()); } @@ -6283,7 +6288,10 @@ void LLAgent::setTeleportState(ETeleportState state) { mbTeleportKeepsLookAt = false; } - if (mTeleportState > TELEPORT_NONE && gSavedSettings.getBOOL("FreezeTime")) + + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); + + if (mTeleportState > TELEPORT_NONE && (*sFreezeTime)) { LLFloaterSnapshot::hide(0); } diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index b3f3e59..817517e 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -4146,9 +4146,10 @@ void LLAppViewer::resumeMainloopTimeout(const std::string& state, F32 secs) { if(secs < 0.0f) { - secs = gSavedSettings.getF32("MainloopTimeoutDefault"); + static F32 *sMainloopTimeoutDefault = rebind_llcontrol("MainloopTimeoutDefault", &gSavedSettings, true); + secs = *sMainloopTimeoutDefault; } - + mMainloopTimeout->setTimeout(secs); mMainloopTimeout->start(state); } @@ -4173,7 +4174,8 @@ void LLAppViewer::pingMainloopTimeout(const std::string& state, F32 secs) { if(secs < 0.0f) { - secs = gSavedSettings.getF32("MainloopTimeoutDefault"); + static F32 *sMainloopTimeoutDefault = rebind_llcontrol("MainloopTimeoutDefault", &gSavedSettings, true); + secs = *sMainloopTimeoutDefault; } mMainloopTimeout->setTimeout(secs); diff --git a/linden/indra/newview/lldrawpoolbump.cpp b/linden/indra/newview/lldrawpoolbump.cpp index fb7a213..93fadca 100644 --- a/linden/indra/newview/lldrawpoolbump.cpp +++ b/linden/indra/newview/lldrawpoolbump.cpp @@ -185,7 +185,8 @@ void LLDrawPoolBump::prerender() // static S32 LLDrawPoolBump::numBumpPasses() { - if (gSavedSettings.getBOOL("RenderObjectBump")) + static BOOL* sRenderObjectBump = rebind_llcontrol("RenderObjectBump", &gSavedSettings, true); + if (*sRenderObjectBump) { if (mVertexShaderLevel > 1) { diff --git a/linden/indra/newview/lldrawpoolterrain.cpp b/linden/indra/newview/lldrawpoolterrain.cpp index cac5162..d0bf2c1 100644 --- a/linden/indra/newview/lldrawpoolterrain.cpp +++ b/linden/indra/newview/lldrawpoolterrain.cpp @@ -207,9 +207,10 @@ void LLDrawPoolTerrain::render(S32 pass) renderFull4TU(); } } - + static BOOL* sShowParcelOwners = rebind_llcontrol("ShowParcelOwners", &gSavedSettings, true); + // Special-case for land ownership feedback - if (gSavedSettings.getBOOL("ShowParcelOwners")) + if (*sShowParcelOwners) { if (mVertexShaderLevel > 1) { //use fullbright shader for highlighting diff --git a/linden/indra/newview/lldrawpooltree.cpp b/linden/indra/newview/lldrawpooltree.cpp index 46cd2d5..e4560f2 100644 --- a/linden/indra/newview/lldrawpooltree.cpp +++ b/linden/indra/newview/lldrawpooltree.cpp @@ -102,7 +102,9 @@ void LLDrawPoolTree::render(S32 pass) LLGLEnable test(GL_ALPHA_TEST); LLOverrideFaceColor color(this, 1.f, 1.f, 1.f, 1.f); - if (gSavedSettings.getBOOL("RenderAnimateTrees")) + static BOOL* sRenderAnimateTrees = rebind_llcontrol("RenderAnimateTrees", &gSavedSettings, true); + + if (*sRenderAnimateTrees) { renderTree(); } @@ -198,7 +200,9 @@ void LLDrawPoolTree::renderForSelect() gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA); - if (gSavedSettings.getBOOL("RenderAnimateTrees")) + static BOOL* sRenderAnimateTrees = rebind_llcontrol("RenderAnimateTrees", &gSavedSettings, true); + + if (*sRenderAnimateTrees) { renderTree(TRUE); } diff --git a/linden/indra/newview/llfloateractivespeakers.cpp b/linden/indra/newview/llfloateractivespeakers.cpp index 51e7b89..f8c3166 100644 --- a/linden/indra/newview/llfloateractivespeakers.cpp +++ b/linden/indra/newview/llfloateractivespeakers.cpp @@ -511,7 +511,9 @@ void LLPanelActiveSpeakers::refreshSpeakers() } else { - name_cell->setColor(LLColor4::black); + static LLColor4* sDefaultListText = rebind_llcontrol("DefaultListText", &gColors, true); + + name_cell->setColor((*sDefaultListText)); } std::string speaker_name; diff --git a/linden/indra/newview/llfloatersnapshot.cpp b/linden/indra/newview/llfloatersnapshot.cpp index 9e8c38b..c0e972d 100644 --- a/linden/indra/newview/llfloatersnapshot.cpp +++ b/linden/indra/newview/llfloatersnapshot.cpp @@ -738,7 +738,10 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) LLVector3 new_camera_pos = LLViewerCamera::getInstance()->getOrigin(); LLQuaternion new_camera_rot = LLViewerCamera::getInstance()->getQuaternion(); - if (gSavedSettings.getBOOL("FreezeTime") && + + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); + + if ((*sFreezeTime) && (new_camera_pos != previewp->mCameraPos || dot(new_camera_rot, previewp->mCameraRot) < 0.995f)) { previewp->mCameraPos = new_camera_pos; @@ -2334,8 +2337,10 @@ LLSnapshotFloaterView::~LLSnapshotFloaterView() BOOL LLSnapshotFloaterView::handleKey(KEY key, MASK mask, BOOL called_from_parent) { + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); + // use default handler when not in freeze-frame mode - if(!gSavedSettings.getBOOL("FreezeTime")) + if(!(*sFreezeTime)) { return LLFloaterView::handleKey(key, mask, called_from_parent); } @@ -2355,8 +2360,9 @@ BOOL LLSnapshotFloaterView::handleKey(KEY key, MASK mask, BOOL called_from_paren BOOL LLSnapshotFloaterView::handleMouseDown(S32 x, S32 y, MASK mask) { + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); // use default handler when not in freeze-frame mode - if(!gSavedSettings.getBOOL("FreezeTime")) + if(!(*sFreezeTime)) { return LLFloaterView::handleMouseDown(x, y, mask); } @@ -2370,8 +2376,9 @@ BOOL LLSnapshotFloaterView::handleMouseDown(S32 x, S32 y, MASK mask) BOOL LLSnapshotFloaterView::handleMouseUp(S32 x, S32 y, MASK mask) { + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); // use default handler when not in freeze-frame mode - if(!gSavedSettings.getBOOL("FreezeTime")) + if(!(*sFreezeTime)) { return LLFloaterView::handleMouseUp(x, y, mask); } @@ -2385,8 +2392,9 @@ BOOL LLSnapshotFloaterView::handleMouseUp(S32 x, S32 y, MASK mask) BOOL LLSnapshotFloaterView::handleHover(S32 x, S32 y, MASK mask) { + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); // use default handler when not in freeze-frame mode - if(!gSavedSettings.getBOOL("FreezeTime")) + if(!(*sFreezeTime)) { return LLFloaterView::handleHover(x, y, mask); } diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index 7a9efcb..f6f09b1 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp @@ -1056,7 +1056,9 @@ void click_apply_to_selection(void* user) void commit_select_tool(LLUICtrl *ctrl, void *data) { - S32 show_owners = gSavedSettings.getBOOL("ShowParcelOwners"); + static BOOL* sShowParcelOwners = rebind_llcontrol("ShowParcelOwners", &gSavedSettings, true); + + S32 show_owners = *sShowParcelOwners; gFloaterTools->setEditTool(data); gSavedSettings.setBOOL("ShowParcelOwners", show_owners); } diff --git a/linden/indra/newview/llfolderview.cpp b/linden/indra/newview/llfolderview.cpp index 16c0aa9..ce2b2b4 100644 --- a/linden/indra/newview/llfolderview.cpp +++ b/linden/indra/newview/llfolderview.cpp @@ -2893,7 +2893,9 @@ const std::string LLFolderView::getFilterSubString(BOOL trim) void LLFolderView::filter( LLInventoryFilter& filter ) { LLFastTimer t2(LLFastTimer::FTM_FILTER); - filter.setFilterCount(llclamp(gSavedSettings.getS32("FilterItemsPerFrame"), 1, 5000)); + static S32 *sFilterItemsPerFrame = rebind_llcontrol("FilterItemsPerFrame", &gSavedSettings, true); + + filter.setFilterCount(llclamp(*sFilterItemsPerFrame, 1, 5000)); if (getCompletedFilterGeneration() < filter.getCurrentGeneration()) { @@ -3264,8 +3266,10 @@ void LLFolderView::draw() setShowSingleSelection(FALSE); } + static F32 *sTypeAheadTimeout = rebind_llcontrol("TypeAheadTimeout", &gSavedSettings, true); + - if (mSearchTimer.getElapsedTimeF32() > gSavedSettings.getF32("TypeAheadTimeout") || !mSearchString.size()) + if (mSearchTimer.getElapsedTimeF32() > *sTypeAheadTimeout || !mSearchString.size()) { mSearchString.clear(); } @@ -3995,8 +3999,11 @@ BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char) LLMenuGL::sMenuContainer->hideMenus(); } + static F32 *sTypeAheadTimeout = rebind_llcontrol("TypeAheadTimeout", &gSavedSettings, true); + + //do text search - if (mSearchTimer.getElapsedTimeF32() > gSavedSettings.getF32("TypeAheadTimeout")) + if (mSearchTimer.getElapsedTimeF32() > *sTypeAheadTimeout) { mSearchString.clear(); } @@ -4340,10 +4347,10 @@ void LLFolderView::doIdle() { LLFastTimer t2(LLFastTimer::FTM_INVENTORY); - BOOL debug_filters = gSavedSettings.getBOOL("DebugInventoryFilters"); - if (debug_filters != getDebugFilters()) + static BOOL* debug_filters = rebind_llcontrol("DebugInventoryFilters", &gSavedSettings, true); + if (*debug_filters != getDebugFilters()) { - mDebugFilters = debug_filters; + mDebugFilters = *debug_filters; arrangeAll(); } diff --git a/linden/indra/newview/llgroupnotify.cpp b/linden/indra/newview/llgroupnotify.cpp index d906633..1b00dfb 100644 --- a/linden/indra/newview/llgroupnotify.cpp +++ b/linden/indra/newview/llgroupnotify.cpp @@ -115,7 +115,10 @@ LLGroupNotifyBox::LLGroupNotifyBox(const std::string& subject, setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); setBackgroundVisible(TRUE); setBackgroundOpaque(TRUE); - setBackgroundColor( gColors.getColor("GroupNotifyBoxColor") ); + + static LLColor4* sGroupNotifyBoxColor = rebind_llcontrol("GroupNotifyBoxColor", &gColors, true); + + setBackgroundColor( (*sGroupNotifyBoxColor) ); LLIconCtrl* icon; LLTextEditor* text; @@ -133,7 +136,10 @@ LLGroupNotifyBox::LLGroupNotifyBox(const std::string& subject, setFontStyle(LLFontGL::DROP_SHADOW_SOFT); setBorderVisible(FALSE); setColor( gColors.getColor("GroupNotifyTextColor") ); - setBackgroundColor( gColors.getColor("GroupNotifyBoxColor") ); + + static LLColor4* sGroupNotifyBoxColor = rebind_llcontrol("GroupNotifyBoxColor", &gColors, true); + + setBackgroundColor( (*sGroupNotifyBoxColor) ); } }; diff --git a/linden/indra/newview/llhudeffectlookat.cpp b/linden/indra/newview/llhudeffectlookat.cpp index 58d2c6a..23fc947 100644 --- a/linden/indra/newview/llhudeffectlookat.cpp +++ b/linden/indra/newview/llhudeffectlookat.cpp @@ -299,14 +299,14 @@ void LLHUDEffectLookAt::packData(LLMessageSystem *mesgsys) bool is_self = source_avatar->isSelf(); - bool is_private = gSavedSettings.getBOOL("PrivateLookAtTarget"); + static BOOL *sPrivateLookAtTarget = rebind_llcontrol("PrivateLookAtTarget", &gSavedSettings, true); if (!is_self) //imprudence TODO: find out why this happens at all and fix there { LL_DEBUGS("HUDEffect")<< "Non-self Avatar HUDEffectLookAt message for ID: " << source_avatar->getID().asString() << LL_ENDL; markDead(); return; } - else if (is_private && target_type != LOOKAT_TARGET_AUTO_LISTEN) + else if (*sPrivateLookAtTarget && target_type != LOOKAT_TARGET_AUTO_LISTEN) { //this mimicks "do nothing" target_type = LOOKAT_TARGET_AUTO_LISTEN; @@ -574,7 +574,8 @@ void LLHUDEffectLookAt::render() } gGL.end(); gGL.popMatrix(); - if( gSavedSettings.getBOOL("ShowLookAtNames") ) + static BOOL *sEmeraldShowLookAtNames = rebind_llcontrol("EmeraldShowLookAtNames", &gSavedSettings, true); + if (*sEmeraldShowLookAtNames) { const LLFontGL* fontp = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL ); LLGLEnable color_mat(GL_COLOR_MATERIAL); diff --git a/linden/indra/newview/llhudeffecttrail.cpp b/linden/indra/newview/llhudeffecttrail.cpp index 08f4c78..1b0f3b3 100644 --- a/linden/indra/newview/llhudeffecttrail.cpp +++ b/linden/indra/newview/llhudeffecttrail.cpp @@ -181,7 +181,9 @@ void LLHUDEffectSpiral::triggerLocal() { mKillTime = mTimer.getElapsedTimeF32() + mDuration; - BOOL show_beam = gSavedSettings.getBOOL("ShowSelectionBeam"); + static BOOL* sShowSelectionBeam = rebind_llcontrol("ShowSelectionBeam", &gSavedSettings, true); + + BOOL show_beam = *sShowSelectionBeam; LLColor4 color; color.setVec(mColor); @@ -278,10 +280,12 @@ void LLHUDEffectSpiral::render() { F32 time = mTimer.getElapsedTimeF32(); + static BOOL* sShowSelectionBeam = rebind_llcontrol("ShowSelectionBeam", &gSavedSettings, true); + if ((!mSourceObject.isNull() && mSourceObject->isDead()) || (!mTargetObject.isNull() && mTargetObject->isDead()) || mKillTime < time || - (!mPartSourcep.isNull() && !gSavedSettings.getBOOL("ShowSelectionBeam")) ) + (!mPartSourcep.isNull() && !*sShowSelectionBeam) ) { markDead(); return; diff --git a/linden/indra/newview/llhudtext.cpp b/linden/indra/newview/llhudtext.cpp index 661a786..7d9f7f9 100644 --- a/linden/indra/newview/llhudtext.cpp +++ b/linden/indra/newview/llhudtext.cpp @@ -292,9 +292,14 @@ void LLHUDText::renderText(BOOL for_select) // *TODO: cache this image LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga"); + static LLColor4* sBackgroundChatColor = rebind_llcontrol("BackgroundChatColor", &gSavedSettings, true); + // *TODO: make this a per-text setting - LLColor4 bg_color = gSavedSettings.getColor4("BackgroundChatColor"); - bg_color.setAlpha(gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor); + LLColor4 bg_color = *sBackgroundChatColor; + + static F32* sChatBubbleOpacity = rebind_llcontrol("ChatBubbleOpacity", &gSavedSettings, true); + + bg_color.setAlpha(*sChatBubbleOpacity * alpha_factor); const S32 border_height = 16; const S32 border_width = 16; @@ -394,7 +399,7 @@ void LLHUDText::renderText(BOOL for_select) { LLUI::pushMatrix(); { - gGL.color4f(text_color.mV[VX], text_color.mV[VY], text_color.mV[VZ], gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor); + gGL.color4f(text_color.mV[VX], text_color.mV[VY], text_color.mV[VZ], *sChatBubbleOpacity * alpha_factor); LLVector3 label_height = (mFontp->getLineHeight() * mLabelSegments.size() + (VERTICAL_PADDING / 3.f)) * y_pixel_vec; LLVector3 label_offset = height_vec - label_height; LLUI::translate(label_offset.mV[VX], label_offset.mV[VY], label_offset.mV[VZ]); diff --git a/linden/indra/newview/llmediaremotectrl.cpp b/linden/indra/newview/llmediaremotectrl.cpp index f2ec414..67cb758 100644 --- a/linden/indra/newview/llmediaremotectrl.cpp +++ b/linden/indra/newview/llmediaremotectrl.cpp @@ -151,8 +151,11 @@ void LLMediaRemoteCtrl::enableMediaButtons() bool play_music_enabled = false; bool stop_music_enabled = false; bool media_show_pause = false; - LLColor4 music_icon_color = LLUI::sColorsGroup->getColor( "IconDisabledColor" ); - LLColor4 media_icon_color = LLUI::sColorsGroup->getColor( "IconDisabledColor" ); + + static LLColor4* sIconDisabledColor = rebind_llcontrol("IconDisabledColor", &gColors, true); + + LLColor4 music_icon_color = (*sIconDisabledColor).getValue(); + LLColor4 media_icon_color = (*sIconDisabledColor).getValue(); std::string media_type = "none/none"; // Put this in xui file @@ -161,7 +164,7 @@ void LLMediaRemoteCtrl::enableMediaButtons() if (gSavedSettings.getBOOL("AudioStreamingVideo")) { - if ( parcel && parcel->getMediaURL()[0]) + if ( parcel && !parcel->getMediaURL().empty()) { // Set the tooltip // Put this text into xui file @@ -197,10 +200,10 @@ void LLMediaRemoteCtrl::enableMediaButtons() } } } + if (gSavedSettings.getBOOL("AudioStreamingMusic") && gAudiop) { - - if ( parcel && parcel->getMusicURL()[0]) + if ( parcel && !parcel->getMusicURL().empty()) { music_icon_color = LLUI::sColorsGroup->getColor( "IconEnabledColor" ); diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index 8f7dd03..8a12ff3 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp @@ -350,11 +350,21 @@ void LLNetMap::draw() F32 min_pick_dist = mDotRadius * MIN_PICK_SCALE; // Draw avatars - LLColor4 avatar_color = gColors.getColor( "MapAvatar" ); - LLColor4 friend_color = gColors.getColor( "MapFriend" ); - LLColor4 muted_color = gColors.getColor( "MapMuted" ); - LLColor4 selected_color = gColors.getColor( "MapSelected" ); - LLColor4 imp_dev_color = gColors.getColor( "MapImpDev" ); + static LLColor4* sMapAvatar = rebind_llcontrol("MapAvatar", &gColors, true); + LLColor4 avatar_color = (*sMapAvatar).getValue(); + + static LLColor4* sMapFriend = rebind_llcontrol("MapFriend", &gColors, true); + LLColor4 friend_color = (*sMapFriend).getValue(); + + static LLColor4* sMapMuted = rebind_llcontrol("MapMuted", &gColors, true); + LLColor4 muted_color = (*sMapMuted).getValue(); + + static LLColor4* sMapSelected = rebind_llcontrol("MapSelected", &gColors, true); + LLColor4 selected_color = (*sMapSelected).getValue(); + + static LLColor4* sMapImpDev = rebind_llcontrol("MapImpDev", &gColors, true); + LLColor4 imp_dev_color = (*sMapImpDev).getValue(); + LLColor4 glyph_color; int selected = -1; diff --git a/linden/indra/newview/llnotify.cpp b/linden/indra/newview/llnotify.cpp index ef57aaf..1a7b247 100644 --- a/linden/indra/newview/llnotify.cpp +++ b/linden/indra/newview/llnotify.cpp @@ -227,7 +227,10 @@ LLNotifyBox::LLNotifyBox(LLNotificationPtr notification, caution_box->setFontStyle(LLFontGL::BOLD); caution_box->setColor(gColors.getColor("NotifyCautionWarnColor")); - caution_box->setBackgroundColor(gColors.getColor("NotifyCautionBoxColor")); + + static LLColor4* sNotifyCautionBoxColor = rebind_llcontrol("NotifyCautionBoxColor", &gColors, true); + + caution_box->setBackgroundColor((*sNotifyCautionBoxColor)); caution_box->setBorderVisible(FALSE); caution_box->setWrappedText(notification->getMessage()); @@ -485,7 +488,10 @@ void LLNotifyBox::drawBackground() const { gGL.getTexUnit(0)->bind(imagep->getImage()); // set proper background color depending on whether notify box is a caution or not - LLColor4 color = mIsCaution? gColors.getColor("NotifyCautionBoxColor") : gColors.getColor("NotifyBoxColor"); + static LLColor4* sNotifyCautionBoxColor = rebind_llcontrol("NotifyCautionBoxColor", &gColors, true); + static LLColor4* sNotifyBoxColor = rebind_llcontrol("NotifyBoxColor", &gColors, true); + + LLColor4 color = mIsCaution? (*sNotifyCautionBoxColor) : (*sNotifyBoxColor); if(gFocusMgr.childHasKeyboardFocus( this )) { const S32 focus_width = 2; @@ -500,9 +506,9 @@ void LLNotifyBox::drawBackground() const gl_segmented_rect_2d_tex(0, getRect().getHeight(), getRect().getWidth(), 0, imagep->getTextureWidth(), imagep->getTextureHeight(), 16, mIsTip ? ROUNDED_RECT_TOP : ROUNDED_RECT_BOTTOM); if( mIsCaution ) - color = gColors.getColor("NotifyCautionBoxColor"); + color = (*sNotifyCautionBoxColor); else - color = gColors.getColor("NotifyBoxColor"); + color = (*sNotifyBoxColor); gGL.color4fv(color.mV); gl_segmented_rect_2d_tex(1, getRect().getHeight()-1, getRect().getWidth()-1, 1, imagep->getTextureWidth(), imagep->getTextureHeight(), 16, mIsTip ? ROUNDED_RECT_TOP : ROUNDED_RECT_BOTTOM); diff --git a/linden/indra/newview/lloverlaybar.cpp b/linden/indra/newview/lloverlaybar.cpp index 6191a01..14ae3ff 100644 --- a/linden/indra/newview/lloverlaybar.cpp +++ b/linden/indra/newview/lloverlaybar.cpp @@ -359,19 +359,22 @@ void LLOverlayBar::refresh() // update "remotes" childSetVisible("media_remote_container", TRUE); childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled()); - childSetVisible("windlight_remote_container", gSavedSettings.getBOOL("EnableWindlightRemote")); - childSetVisible("ao_remote_container", gSavedSettings.getBOOL("EnableAORemote")); + static BOOL *sEnableWindlightRemote = rebind_llcontrol("EnableWindlightRemote", &gSavedSettings, true); + childSetVisible("windlight_remote_container", (*sEnableWindlightRemote)); + static BOOL *sEnableAORemote = rebind_llcontrol("EnableAORemote", &gSavedSettings, true); + childSetVisible("ao_remote_container", (*sEnableAORemote)); childSetVisible("state_buttons", TRUE); } + static BOOL *sChatVisible = rebind_llcontrol("ChatVisible", &gSavedSettings, true); // always let user toggle into and out of chatbar - childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible")); + childSetVisible("chat_bar", *sChatVisible);//gSavedSettings.getBOOL("ChatVisible")); + if (buttons_changed) { layoutButtons(); } - } //----------------------------------------------------------------------- diff --git a/linden/indra/newview/llpanelaudiovolume.cpp b/linden/indra/newview/llpanelaudiovolume.cpp index 5045e8f..bb10f80 100644 --- a/linden/indra/newview/llpanelaudiovolume.cpp +++ b/linden/indra/newview/llpanelaudiovolume.cpp @@ -67,8 +67,9 @@ LLPanelAudioVolume::~LLPanelAudioVolume () // void LLPanelAudioVolume::draw() { - BOOL mute = gSavedSettings.getBOOL("MuteAudio"); - bool enable = mute ? false : true; + + static BOOL* sMuteAudio = rebind_llcontrol("MuteAudio", &gSavedSettings, true); + bool enable = (*sMuteAudio) ? false : true; childSetEnabled("Music Volume", enable); childSetEnabled("Media Volume", enable); childSetEnabled("Voice Volume", enable); diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp index 33f4cd6..e88a16a 100644 --- a/linden/indra/newview/llpanelavatar.cpp +++ b/linden/indra/newview/llpanelavatar.cpp @@ -1499,13 +1499,15 @@ void LLPanelAvatar::resetGroupList() row["columns"][0]["width"] = 0; if (group_data.mListInProfile) { + static LLColor4 *sScrollUnselectedColor = rebind_llcontrol("ScrollUnselectedColor", LLUI::sColorsGroup, true); row["columns"][0]["value"] = group_string; - row["columns"][0]["color"] = gColors.getColor("ScrollUnselectedColor").getValue(); + row["columns"][0]["color"] = (*sScrollUnselectedColor).getValue(); } else { + static LLColor4 *sScrollReadOnlyColor = rebind_llcontrol("ScrollReadOnlyColor", LLUI::sColorsGroup, true); row["columns"][0]["value"] = group_string + " " + getString("HiddenLabel"); - row["columns"][0]["color"] = gColors.getColor("ScrollReadOnlyColor").getValue(); + row["columns"][0]["color"] = (*sScrollReadOnlyColor).getValue(); } group_list->addElement(row); } @@ -2063,13 +2065,15 @@ void LLPanelAvatar::processAvatarGroupsReply(LLMessageSystem *msg, void**) // Set normal color if not found or if group is visible in profile if (!group_data || group_data->mListInProfile) { + static LLColor4 *sScrollUnselectedColor = rebind_llcontrol("ScrollUnselectedColor", LLUI::sColorsGroup, true); row["columns"][0]["value"] = group_string; - row["columns"][0]["color"] = gColors.getColor("ScrollUnselectedColor").getValue(); + row["columns"][0]["color"] = (*sScrollUnselectedColor).getValue(); } else { + static LLColor4 *sScrollReadOnlyColor = rebind_llcontrol("ScrollReadOnlyColor", LLUI::sColorsGroup, true); row["columns"][0]["value"] = group_string + " " + self->getString("HiddenLabel"); - row["columns"][0]["color"] = gColors.getColor("ScrollReadOnlyColor").getValue(); + row["columns"][0]["color"] = (*sScrollReadOnlyColor).getValue(); } if (group_list) { diff --git a/linden/indra/newview/llpaneldisplay.cpp b/linden/indra/newview/llpaneldisplay.cpp index b2313f6..e17ba2b 100644 --- a/linden/indra/newview/llpaneldisplay.cpp +++ b/linden/indra/newview/llpaneldisplay.cpp @@ -325,8 +325,9 @@ BOOL LLPanelDisplay::postBuild() mLightingText = getChild("LightingDetailText"); mMeshDetailText = getChild("MeshDetailText"); - childSetValue("toggle_windlight_control", gSavedSettings.getBOOL("EnableWindlightRemote")); - mWLControl = gSavedSettings.getBOOL("EnableWindlightRemote"); + static BOOL* sEnableWindlightRemote = rebind_llcontrol("EnableWindlightRemote", &gSavedSettings, true); + childSetValue("toggle_windlight_control", (*sEnableWindlightRemote)); + mWLControl = (*sEnableWindlightRemote); refresh(); @@ -387,7 +388,8 @@ void LLPanelDisplay::refresh() mCustomSettings = gSavedSettings.getBOOL("RenderCustomSettings"); // shader settings - mBumpShiny = gSavedSettings.getBOOL("RenderObjectBump"); + static BOOL* sRenderObjectBump = rebind_llcontrol("RenderObjectBump", &gSavedSettings, true); + mBumpShiny = *sRenderObjectBump; mShaderEnable = gSavedSettings.getBOOL("VertexShaderEnable"); mWindLight = gSavedSettings.getBOOL("WindLightUseAtmosShaders"); mReflections = gSavedSettings.getBOOL("RenderWaterReflections"); @@ -418,7 +420,8 @@ void LLPanelDisplay::refresh() mTerrainDetail = gSavedSettings.getS32("RenderTerrainDetail"); // windlight remote - mWLControl = gSavedSettings.getBOOL("EnableWindlightRemote"); + static BOOL* sEnableWindlightRemote = rebind_llcontrol("EnableWindlightRemote", &gSavedSettings, true); + mWLControl = (*sEnableWindlightRemote); // max avatar count mAvatarMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible"); diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp index cb0416e..aa62b34 100644 --- a/linden/indra/newview/llprefsadvanced.cpp +++ b/linden/indra/newview/llprefsadvanced.cpp @@ -83,8 +83,10 @@ BOOL LLPrefsAdvanced::postBuild() { childSetValue("disable_log_screen_check", gSavedSettings.getBOOL("DisableLoginLogoutScreens")); childSetValue("disable_tp_screen_check", gSavedSettings.getBOOL("DisableTeleportScreens")); - childSetValue("client_name_tag_check", gSavedSettings.getBOOL("ShowClientNameTag")); - childSetValue("client_name_color_check", gSavedSettings.getBOOL("ShowClientColor")); + static BOOL* sShowClientNameTag = rebind_llcontrol("ShowClientNameTag", &gSavedSettings, true); + childSetValue("client_name_tag_check", (*sShowClientNameTag)); + static BOOL* sShowClientColor = rebind_llcontrol("ShowClientColor", &gSavedSettings, true); + childSetValue("client_name_color_check", (*sShowClientColor)); childSetValue("client_name_hover_check", gSavedSettings.getBOOL("ShowClientNameHoverTip")); childSetValue("client_name_tag_broadcast_check", gSavedSettings.getBOOL("ShowMyClientTagToOthers")); childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP")); diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp index b4614b8..6ebc880 100644 --- a/linden/indra/newview/llprefschat.cpp +++ b/linden/indra/newview/llprefschat.cpp @@ -140,9 +140,10 @@ void LLPrefsChatImpl::refreshValues() mPlayTypingAnim = gSavedSettings.getBOOL("PlayTypingAnim"); mChatChannel = gSavedSettings.getBOOL("ChatChannelSelect"); mConsoleOpacity = gSavedSettings.getF32("ConsoleBackgroundOpacity"); - mBubbleOpacity = gSavedSettings.getF32("ChatBubbleOpacity"); mTranslateLanguage = gSavedSettings.getString("TranslateLanguage"); mTranslateChat = gSavedSettings.getBOOL("TranslateChat"); + static F32* sChatBubbleOpacity = rebind_llcontrol("ChatBubbleOpacity", &gSavedSettings, true); + mBubbleOpacity = *sChatBubbleOpacity; } void LLPrefsChatImpl::cancel() diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 4fd4daa..39d9ab6 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -1938,7 +1938,9 @@ bool idle_startup() LLFloaterActiveSpeakers::showInstance(); } - if (gSavedSettings.getBOOL("BeaconsEnabled")) + static BOOL* sBeaconsEnabled = rebind_llcontrol("BeaconsEnabled", &gSavedSettings, true); + + if (*sBeaconsEnabled) { LLFloaterBeacons::showInstance(); } diff --git a/linden/indra/newview/llstatgraph.cpp b/linden/indra/newview/llstatgraph.cpp index 26b7494..ace1731 100644 --- a/linden/indra/newview/llstatgraph.cpp +++ b/linden/indra/newview/llstatgraph.cpp @@ -109,7 +109,9 @@ void LLStatGraph::draw() // gColors.getColor("ColorDropShadow"), // (S32) gSavedSettings.getF32("DropShadowFloater") ); - color = gColors.getColor( "MenuDefaultBgColor" ); + static LLColor4* sMenuDefaultBgColor = rebind_llcontrol("MenuDefaultBgColor", &gColors, true); + color = (*sMenuDefaultBgColor).getValue(); + gGL.color4fv(color.mV); gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, TRUE); diff --git a/linden/indra/newview/llstatusbar.cpp b/linden/indra/newview/llstatusbar.cpp index 366363b..fbb99f0 100644 --- a/linden/indra/newview/llstatusbar.cpp +++ b/linden/indra/newview/llstatusbar.cpp @@ -227,12 +227,15 @@ void LLStatusBar::draw() { refresh(); + /*static LLColor4* sColorDropShadow = rebind_llcontrol("ColorDropShadow", LLUI::sColorsGroup, true); + static S32* sDropShadowFloater = rebind_llcontrol("DropShadowFloater", LLUI::sConfigGroup, true); + if (isBackgroundVisible()) { gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0, - LLUI::sColorsGroup->getColor("ColorDropShadow"), - LLUI::sConfigGroup->getS32("DropShadowFloater") ); - } + (*sColorDropShadow), + (*sDropShadowFloater) ); + }*/ LLPanel::draw(); } diff --git a/linden/indra/newview/lltexturefetch.cpp b/linden/indra/newview/lltexturefetch.cpp index 2184478..5cad14c 100644 --- a/linden/indra/newview/lltexturefetch.cpp +++ b/linden/indra/newview/lltexturefetch.cpp @@ -750,7 +750,9 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mState == LOAD_FROM_NETWORK) { - bool get_url = gSavedSettings.getBOOL("ImagePipelineUseHTTP"); + static BOOL* sImagePipelineUseHTTP = rebind_llcontrol("ImagePipelineUseHTTP", &gSavedSettings, true); + + bool get_url = *sImagePipelineUseHTTP; if (!mUrl.empty()) get_url = false; // if (mHost != LLHost::invalid) get_url = false; if ( get_url && mCanUseHTTP && mUrl.empty())//get http url. diff --git a/linden/indra/newview/lltoolfocus.cpp b/linden/indra/newview/lltoolfocus.cpp index 351c02b..ae0cd1e 100644 --- a/linden/indra/newview/lltoolfocus.cpp +++ b/linden/indra/newview/lltoolfocus.cpp @@ -216,10 +216,12 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) gAgent.setFocusGlobal(pick_info); } + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); + if (!(pick_info.mKeyMask & MASK_ALT) && gAgent.cameraThirdPerson() && gViewerWindow->getLeftMouseDown() && - !gSavedSettings.getBOOL("FreezeTime") && + !(*sFreezeTime) && (hit_obj == gAgent.getAvatarObject() || (hit_obj && hit_obj->isAttachment() && LLVOAvatar::findAvatarFromAttachment(hit_obj)->isSelf()))) { diff --git a/linden/indra/newview/llvieweraudio.cpp b/linden/indra/newview/llvieweraudio.cpp index f043fb5..672836d 100644 --- a/linden/indra/newview/llvieweraudio.cpp +++ b/linden/indra/newview/llvieweraudio.cpp @@ -114,10 +114,14 @@ void init_audio() void audio_update_volume(bool force_update) { - F32 master_volume = gSavedSettings.getF32("AudioLevelMaster"); - bool wind_muted = gSavedSettings.getBOOL("MuteWind"); - bool mute_audio = gSavedSettings.getBOOL("MuteAudio"); + static BOOL* sMuteAudio = rebind_llcontrol("MuteAudio", &gSavedSettings, true); + static BOOL* sMuteWind = rebind_llcontrol("MuteWind", &gSavedSettings, true); + static F32 *sAudioLevelMaster = rebind_llcontrol("AudioLevelMaster", &gSavedSettings, true); + + F32 master_volume = (*sAudioLevelMaster); + bool wind_muted = (*sMuteWind); + BOOL mute_audio = (*sMuteAudio); if (!gViewerWindow->getActive() && (gSavedSettings.getBOOL("MuteWhenMinimized"))) { mute_audio = TRUE; diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 026f652..e109673 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -7509,7 +7509,9 @@ class LLViewEnableMouselook : public view_listener_t { // You can't go directly from customize avatar to mouselook. // TODO: write code with appropriate dialogs to handle this transition. - bool new_value = (CAMERA_MODE_CUSTOMIZE_AVATAR != gAgent.getCameraMode() && !gSavedSettings.getBOOL("FreezeTime")); + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); + + bool new_value = (CAMERA_MODE_CUSTOMIZE_AVATAR != gAgent.getCameraMode() && !(*sFreezeTime)); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); return true; } diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index e216c44..35fd395 100755 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -3022,7 +3022,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) if (!is_muted && !is_busy) { - visible_in_chat_bubble = gSavedSettings.getBOOL("UseChatBubbles"); + static BOOL* sUseChatBubbles = rebind_llcontrol("UseChatBubbles", &gSavedSettings, true); + visible_in_chat_bubble = *sUseChatBubbles; ((LLVOAvatar*)chatter)->addChat(chat); } } diff --git a/linden/indra/newview/llviewerobjectlist.cpp b/linden/indra/newview/llviewerobjectlist.cpp index bfb248b..78ce247 100644 --- a/linden/indra/newview/llviewerobjectlist.cpp +++ b/linden/indra/newview/llviewerobjectlist.cpp @@ -698,7 +698,9 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) } } - if (gSavedSettings.getBOOL("FreezeTime")) + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); + + if ((*sFreezeTime)) { for (std::vector::iterator iter = idle_list.begin(); iter != idle_list.end(); iter++) diff --git a/linden/indra/newview/llviewerstats.cpp b/linden/indra/newview/llviewerstats.cpp index 93e69ca..607f871 100644 --- a/linden/indra/newview/llviewerstats.cpp +++ b/linden/indra/newview/llviewerstats.cpp @@ -533,7 +533,8 @@ void update_statistics(U32 frame_count) LLViewerStats::getInstance()->setStat(LLViewerStats::ST_ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable")); LLViewerStats::getInstance()->setStat(LLViewerStats::ST_LIGHTING_DETAIL, (F64)gSavedSettings.getS32("RenderLightingDetail")); LLViewerStats::getInstance()->setStat(LLViewerStats::ST_DRAW_DIST, (F64)gSavedSettings.getF32("RenderFarClip")); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CHAT_BUBBLES, (F64)gSavedSettings.getBOOL("UseChatBubbles")); + static BOOL* sUseChatBubbles = rebind_llcontrol("UseChatBubbles", &gSavedSettings, true); + LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CHAT_BUBBLES, (F64)*sUseChatBubbles); #if 0 // 1.9.2 LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_OBJECTS, (F64)gSavedSettings.getS32("VertexShaderLevelObject")); LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_AVATAR, (F64)gSavedSettings.getBOOL("VertexShaderLevelAvatar")); diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index 43a0d19..3a68f0f 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp @@ -298,7 +298,9 @@ public: U32 ypos = 64; const U32 y_inc = 20; - if (gSavedSettings.getBOOL("DebugShowTime")) + static BOOL *sDebugShowTime = rebind_llcontrol("DebugShowTime", &gSavedSettings, true); + + if(*sDebugShowTime) { const U32 y_inc2 = 15; for (std::map::reverse_iterator iter = gDebugTimers.rbegin(); @@ -513,8 +515,10 @@ public: addText(xpos, ypos, llformat("%d %d %d %d", color[0], color[1], color[2], color[3])); ypos += y_inc; } + static BOOL* sBeaconsEnabled = rebind_llcontrol("BeaconsEnabled", &gSavedSettings, true); + // only display these messages if we are actually rendering beacons at this moment - if (LLPipeline::getRenderBeacons(NULL) && gSavedSettings.getBOOL("BeaconsEnabled")) + if (LLPipeline::getRenderBeacons(NULL) && *sBeaconsEnabled) { if (LLPipeline::getRenderParticleBeacons(NULL)) { @@ -2048,7 +2052,9 @@ void LLViewerWindow::draw() //S32 screen_x, screen_y; // HACK for timecode debugging - if (gSavedSettings.getBOOL("DisplayTimecode")) + static BOOL* sDisplayTimecode = rebind_llcontrol("DisplayTimecode", &gSavedSettings, true); + + if (*sDisplayTimecode) { // draw timecode block std::string text; @@ -2509,7 +2515,9 @@ BOOL LLViewerWindow::handlePerFrameHover() LLVector2 mouse_vel; - if (gSavedSettings.getBOOL("MouseSmooth")) + static BOOL* sMouseSmooth = rebind_llcontrol("MouseSmooth", &gSavedSettings, true); + + if (*sMouseSmooth) { static F32 fdx = 0.f; static F32 fdy = 0.f; @@ -2664,7 +2672,9 @@ BOOL LLViewerWindow::handlePerFrameHover() // Show a new tool tip (or update one that is alrady shown) BOOL tool_tip_handled = FALSE; std::string tool_tip_msg; - F32 tooltip_delay = gSavedSettings.getF32( "ToolTipDelay" ); + static F32 *sToolTipDelay = rebind_llcontrol("ToolTipDelay", &gSavedSettings, true); + + F32 tooltip_delay = (*sToolTipDelay); //HACK: hack for tool-based tooltips which need to pop up more quickly //Also for show xui names as tooltips debug mode if ((mouse_captor && !mouse_captor->isView()) || LLUI::sShowXUINames) @@ -2715,9 +2725,10 @@ BOOL LLViewerWindow::handlePerFrameHover() { mToolTip->setVisible( tooltip_vis ); } - } + } + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); - if (tool && tool != gToolNull && tool != LLToolCompInspect::getInstance() && tool != LLToolDragAndDrop::getInstance() && !gSavedSettings.getBOOL("FreezeTime")) + if (tool && tool != gToolNull && tool != LLToolCompInspect::getInstance() && tool != LLToolDragAndDrop::getInstance() && !(*sFreezeTime)) { LLMouseHandler *captor = gFocusMgr.getMouseCapture(); // With the null, inspect, or drag and drop tool, don't muck diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 36d60dd..7664041 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp @@ -3457,13 +3457,19 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) } const F32 time_visible = mTimeVisible.getElapsedTimeF32(); - const F32 NAME_SHOW_TIME = gSavedSettings.getF32("RenderNameShowTime"); // seconds - const F32 FADE_DURATION = gSavedSettings.getF32("RenderNameFadeDuration"); // seconds + + static F32* sRenderNameShowTime = rebind_llcontrol("RenderNameShowTime", &gSavedSettings, true); + static F32* sRenderNameFadeDuration = rebind_llcontrol("RenderNameFadeDuration", &gSavedSettings, true); + + + const F32 NAME_SHOW_TIME = *sRenderNameShowTime; // seconds + const F32 FADE_DURATION = *sRenderNameFadeDuration; // seconds // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0b bool fRlvShowNames = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES); // [/RLVa:KB] BOOL visible_avatar = isVisible() || mNeedsAnimUpdate; - BOOL visible_chat = gSavedSettings.getBOOL("UseChatBubbles") && (mChats.size() || mTyping); + static BOOL* sUseChatBubbles = rebind_llcontrol("UseChatBubbles", &gSavedSettings, true); + BOOL visible_chat = *sUseChatBubbles && (mChats.size() || mTyping); BOOL render_name = visible_chat || (visible_avatar && // [RLVa:KB] - Checked: 2009-08-11 (RLVa-1.0.1h) | Added: RLVa-1.0.0h @@ -3505,6 +3511,9 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) mRenderGroupTitles = sRenderGroupTitles; new_name = TRUE; } + + static LLColor4* sAvatarNameColor = rebind_llcontrol("AvatarNameColor", &gColors, true); + std::string client; // First Calculate Alpha // If alpha > 0, create mNameText if necessary, otherwise delete it @@ -3545,7 +3554,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) new_name = TRUE; } - LLColor4 avatar_name_color = gColors.getColor( "AvatarNameColor" ); + LLColor4 avatar_name_color = (*sAvatarNameColor); LLColor4 client_color = avatar_name_color; if(!mIsSelf) //don't know your own client ? @@ -3560,11 +3569,14 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) // Set your own name to the Imprudence color -- MC client_color = LLColor4(0.79f,0.44f,0.88f); } - if (gSavedSettings.getBOOL("ShowClientColor")) + + static BOOL* sShowClientColor = rebind_llcontrol("ShowClientColor", &gSavedSettings, true); + static BOOL* sShowClientNameTag = rebind_llcontrol("ShowClientNameTag", &gSavedSettings, true); + if (*sShowClientColor) { avatar_name_color = client_color; } - if (!gSavedSettings.getBOOL("ShowClientNameTag")) + if (!(*sShowClientNameTag)) { client.clear(); } @@ -3657,7 +3669,8 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) BOOL need_comma = FALSE; - bool show_client = client.length() != 0 && gSavedSettings.getBOOL("ShowClientNameTag"); + static BOOL* sShowClientNameTag = rebind_llcontrol("ShowClientNameTag", &gSavedSettings, true); + bool show_client = client.length() != 0 && (*sShowClientNameTag); if (is_away || is_muted || is_busy || show_client) { line += " ("; @@ -3726,7 +3739,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) std::deque::iterator chat_iter = mChats.begin(); mNameText->clearString(); - LLColor4 new_chat = gColors.getColor( "AvatarNameColor" ); + LLColor4 new_chat = (*sAvatarNameColor); LLColor4 normal_chat = lerp(new_chat, LLColor4(0.8f, 0.8f, 0.8f, 1.f), 0.7f); LLColor4 old_chat = lerp(normal_chat, LLColor4(0.6f, 0.6f, 0.6f, 1.f), 0.7f); if (mTyping && mChats.size() >= MAX_BUBBLE_CHAT_UTTERANCES) @@ -3788,7 +3801,8 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) } else { - if (gSavedSettings.getBOOL("SmallAvatarNames")) + static BOOL* sSmallAvatarNames = rebind_llcontrol("SmallAvatarNames", &gSavedSettings, true); + if (*sSmallAvatarNames) { mNameText->setFont(LLFontGL::getFontSansSerif()); } @@ -7332,7 +7346,8 @@ BOOL LLVOAvatar::updateIsFullyLoaded() BOOL LLVOAvatar::isFullyLoaded() { - if (gSavedSettings.getBOOL("RenderUnloadedAvatar")) + static BOOL* sRenderUnloadedAvatar = rebind_llcontrol("RenderUnloadedAvatar", &gSavedSettings, true); + if (*sRenderUnloadedAvatar) return TRUE; else return mFullyLoaded; diff --git a/linden/indra/newview/llvoiceremotectrl.cpp b/linden/indra/newview/llvoiceremotectrl.cpp index 1681e96..d11424b 100644 --- a/linden/indra/newview/llvoiceremotectrl.cpp +++ b/linden/indra/newview/llvoiceremotectrl.cpp @@ -114,14 +114,16 @@ void LLVoiceRemoteCtrl::draw() LLFloaterActiveSpeakers::getInstance()->onClose(false); mVoiceLastActive = voice_active; + static BOOL *sPTTCurrentlyEnabled = rebind_llcontrol("PTTCurrentlyEnabled", &gSavedSettings, true); + // propagate ptt state to button display, if (!mTalkBtn->hasMouseCapture()) { // not in push to talk mode, or push to talk is active means I'm talking - mTalkBtn->setToggleState(!gSavedSettings.getBOOL("PTTCurrentlyEnabled") || gVoiceClient->getUserPTTState()); + mTalkBtn->setToggleState(!(*sPTTCurrentlyEnabled) || gVoiceClient->getUserPTTState()); } mSpeakersBtn->setToggleState(LLFloaterActiveSpeakers::instanceVisible(LLSD())); - mTalkLockBtn->setToggleState(!gSavedSettings.getBOOL("PTTCurrentlyEnabled")); + mTalkLockBtn->setToggleState(!(*sPTTCurrentlyEnabled)); std::string talk_blip_image; if (gVoiceClient->getIsSpeaking(gAgent.getID())) diff --git a/linden/indra/newview/llvosky.cpp b/linden/indra/newview/llvosky.cpp index d15a2dc..37fd523 100644 --- a/linden/indra/newview/llvosky.cpp +++ b/linden/indra/newview/llvosky.cpp @@ -1023,7 +1023,10 @@ void LLVOSky::calcAtmospherics(void) // Since WL scales everything by 2, there should always be at least a 2:1 brightness ratio // between sunlight and point lights in windlight to normalize point lights. - F32 sun_dynamic_range = llmax(gSavedSettings.getF32("RenderSunDynamicRange"), 0.0001f); + + static F32 *sRenderSunDynamicRange = rebind_llcontrol("RenderSunDynamicRange", &gSavedSettings, true); + + F32 sun_dynamic_range = llmax((*sRenderSunDynamicRange), 0.0001f); LLWLParamManager::instance()->mSceneLightStrength = 2.0f * (1.0f + sun_dynamic_range * dp); mSunDiffuse = vary_SunlightColor; diff --git a/linden/indra/newview/llvotree.cpp b/linden/indra/newview/llvotree.cpp index 0a7cc92..6a59253 100644 --- a/linden/indra/newview/llvotree.cpp +++ b/linden/indra/newview/llvotree.cpp @@ -359,8 +359,10 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { return TRUE; } + + static BOOL* sRenderAnimateTrees = rebind_llcontrol("RenderAnimateTrees", &gSavedSettings, true); - if (gSavedSettings.getBOOL("RenderAnimateTrees")) + if (*sRenderAnimateTrees) { F32 mass_inv; @@ -403,7 +405,7 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) } } - if (!gSavedSettings.getBOOL("RenderAnimateTrees")) + if (!*sRenderAnimateTrees) { if (mReferenceBuffer.isNull()) { @@ -548,8 +550,8 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) max_indices += sLODIndexCount[lod]; max_vertices += sLODVertexCount[lod]; } - - mReferenceBuffer = new LLVertexBuffer(LLDrawPoolTree::VERTEX_DATA_MASK, gSavedSettings.getBOOL("RenderAnimateTrees") ? GL_STATIC_DRAW_ARB : 0); + static BOOL* sRenderAnimateTrees = rebind_llcontrol("RenderAnimateTrees", &gSavedSettings, true); + mReferenceBuffer = new LLVertexBuffer(LLDrawPoolTree::VERTEX_DATA_MASK, *sRenderAnimateTrees ? GL_STATIC_DRAW_ARB : 0); mReferenceBuffer->allocateBuffer(max_vertices, max_indices, TRUE); LLStrider vertices; @@ -852,8 +854,8 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) llassert(vertex_count == max_vertices); llassert(index_count == max_indices); } - - if (gSavedSettings.getBOOL("RenderAnimateTrees")) + static BOOL* sRenderAnimateTrees = rebind_llcontrol("RenderAnimateTrees", &gSavedSettings, true); + if (*sRenderAnimateTrees) { mDrawable->getFace(0)->mVertexBuffer = mReferenceBuffer; } diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index 5f7327d..bed3e13 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp @@ -2231,8 +2231,13 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) std::vector alpha_faces; U32 useage = group->mSpatialPartition->mBufferUsage; - U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask); - U32 max_total = (gSavedSettings.getS32("RenderMaxNodeSize")*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask); + + static S32* sRenderMaxVBOSize = rebind_llcontrol("RenderMaxVBOSize", &gSavedSettings, true); + static S32* sRenderMaxNodeSize = rebind_llcontrol("RenderMaxNodeSize", &gSavedSettings, true); + + + U32 max_vertices = ((*sRenderMaxVBOSize)*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask); + U32 max_total = ((*sRenderMaxNodeSize)*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask); max_vertices = llmin(max_vertices, (U32) 65535); U32 cur_total = 0; @@ -2505,8 +2510,9 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector& faces, BOOL distance_sort) { + static S32* sRenderMaxVBOSize = rebind_llcontrol("RenderMaxVBOSize", &gSavedSettings, true); //calculate maximum number of vertices to store in a single buffer - U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask); + U32 max_vertices = ((*sRenderMaxVBOSize)*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask); max_vertices = llmin(max_vertices, (U32) 65535); if (!distance_sort) diff --git a/linden/indra/newview/llvowlsky.cpp b/linden/indra/newview/llvowlsky.cpp index abd25e6..96bd62e 100644 --- a/linden/indra/newview/llvowlsky.cpp +++ b/linden/indra/newview/llvowlsky.cpp @@ -334,7 +334,9 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) } { - const U32 max_buffer_bytes = gSavedSettings.getS32("RenderMaxVBOSize")*1024; + static S32* sRenderMaxVBOSize = rebind_llcontrol("RenderMaxVBOSize", &gSavedSettings, true); + + const U32 max_buffer_bytes = (*sRenderMaxVBOSize)*1024; const U32 data_mask = LLDrawPoolWLSky::SKY_VERTEX_DATA_MASK; const U32 max_verts = max_buffer_bytes / LLVertexBuffer::calcStride(data_mask); diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp index 17fad2b..ca8ce2d 100644 --- a/linden/indra/newview/llworld.cpp +++ b/linden/indra/newview/llworld.cpp @@ -667,7 +667,8 @@ void LLWorld::updateParticles() void LLWorld::updateClouds(const F32 dt) { - if (gSavedSettings.getBOOL("FreezeTime") || + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); + if ((*sFreezeTime) || !gSavedSettings.getBOOL("SkyUseClassicClouds")) { // don't move clouds in snapshot mode diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp index e024e4c..0ca94dc 100644 --- a/linden/indra/newview/pipeline.cpp +++ b/linden/indra/newview/pipeline.cpp @@ -1014,8 +1014,8 @@ U32 LLPipeline::addObject(LLViewerObject *vobj) { return 0; } - - if (gSavedSettings.getBOOL("RenderDelayCreation")) + static BOOL sRenderDelayCreation = gSavedSettings.getBOOL("RenderDelayCreation"); + if (sRenderDelayCreation) { mCreateQ.push_back(vobj); } @@ -1078,7 +1078,9 @@ void LLPipeline::createObject(LLViewerObject* vobj) markRebuild(drawablep, LLDrawable::REBUILD_ALL, TRUE); - if (drawablep->getVOVolume() && gSavedSettings.getBOOL("RenderAnimateRes")) + static BOOL sRenderAnimateRes = gSavedSettings.getBOOL("RenderAnimateRes"); + + if (drawablep->getVOVolume() && sRenderAnimateRes) { // fun animated res drawablep->updateXform(TRUE); @@ -1117,7 +1119,8 @@ void LLPipeline::resetFrameStats() //external functions for asynchronous updating void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep) { - if (gSavedSettings.getBOOL("FreezeTime")) + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); + if ((*sFreezeTime)) { return; } @@ -1147,7 +1150,8 @@ void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep) void LLPipeline::updateMoveNormalAsync(LLDrawable* drawablep) { - if (gSavedSettings.getBOOL("FreezeTime")) + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); + if ((*sFreezeTime)) { return; } @@ -1200,7 +1204,8 @@ void LLPipeline::updateMove() LLFastTimer t(LLFastTimer::FTM_UPDATE_MOVE); LLMemType mt(LLMemType::MTYPE_PIPELINE); - if (gSavedSettings.getBOOL("FreezeTime")) + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); + if ((*sFreezeTime)) { return; } @@ -2295,8 +2300,10 @@ void LLPipeline::postSort(LLCamera& camera) std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater()); } + static BOOL* sBeaconsEnabled = rebind_llcontrol("BeaconsEnabled", &gSavedSettings, true); + // only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus - if (gSavedSettings.getBOOL("BeaconsEnabled") && !sShadowRender) + if (*sBeaconsEnabled && !sShadowRender) { if (sRenderScriptedTouchBeacons) { -- cgit v1.1 From 2a1854a9f4181fd9037a6fdf969c08a112a5b6f2 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sun, 26 Sep 2010 16:33:33 +0200 Subject: Converted XUI files to unix line endings, again. See http://github.com/imprudence/imprudence/commit/e20f3bb7c3310deca86cfc66af0a086261930bcf --- .../default/xui/de/floater_active_speakers.xml | 26 +- .../skins/default/xui/de/floater_mute_object.xml | 24 +- .../default/xui/de/floater_sim_release_message.xml | 32 +- .../skins/default/xui/de/panel_media_controls.xml | 76 +- .../default/xui/de/panel_preferences_voice.xml | 72 +- .../skins/default/xui/de/teleport_strings.xml | 156 +-- .../skins/default/xui/en-us/floater_bulk_perms.xml | 272 ++--- .../newview/skins/default/xui/es/floater_about.xml | 72 +- .../skins/default/xui/es/floater_about_land.xml | 1046 +++++++++---------- .../default/xui/es/floater_animation_preview.xml | 330 +++--- .../skins/default/xui/es/floater_auction.xml | 18 +- .../skins/default/xui/es/floater_avatar_picker.xml | 84 +- .../default/xui/es/floater_avatar_textures.xml | 60 +- .../skins/default/xui/es/floater_build_options.xml | 16 +- .../newview/skins/default/xui/es/floater_bumps.xml | 42 +- .../skins/default/xui/es/floater_buy_contents.xml | 42 +- .../skins/default/xui/es/floater_buy_currency.xml | 136 +-- .../skins/default/xui/es/floater_buy_land.xml | 490 ++++----- .../skins/default/xui/es/floater_buy_object.xml | 52 +- .../skins/default/xui/es/floater_chat_history.xml | 182 ++-- .../skins/default/xui/es/floater_choose_group.xml | 16 +- .../skins/default/xui/es/floater_color_picker.xml | 62 +- .../skins/default/xui/es/floater_critical.xml | 22 +- .../skins/default/xui/es/floater_customize.xml | 944 ++++++++--------- .../skins/default/xui/es/floater_directory.xml | 846 ++++++++-------- .../skins/default/xui/es/floater_gesture.xml | 32 +- .../skins/default/xui/es/floater_group_info.xml | 522 +++++----- .../newview/skins/default/xui/es/floater_html.xml | 26 +- .../newview/skins/default/xui/es/floater_im.xml | 90 +- .../skins/default/xui/es/floater_image_preview.xml | 108 +- .../skins/default/xui/es/floater_import.xml | 34 +- .../skins/default/xui/es/floater_inventory.xml | 94 +- .../xui/es/floater_inventory_item_properties.xml | 170 ++-- .../xui/es/floater_inventory_view_finder.xml | 48 +- .../skins/default/xui/es/floater_land_holdings.xml | 80 +- .../default/xui/es/floater_live_lsleditor.xml | 24 +- .../skins/default/xui/es/floater_moveview.xml | 22 +- .../newview/skins/default/xui/es/floater_mute.xml | 14 +- .../default/xui/es/floater_name_description.xml | 22 +- .../skins/default/xui/es/floater_new_im.xml | 22 +- .../default/xui/es/floater_new_outfit_dialog.xml | 176 ++-- .../skins/default/xui/es/floater_openobject.xml | 16 +- .../newview/skins/default/xui/es/floater_pay.xml | 40 +- .../skins/default/xui/es/floater_pay_object.xml | 62 +- .../skins/default/xui/es/floater_postcard.xml | 82 +- .../skins/default/xui/es/floater_preferences.xml | 18 +- .../default/xui/es/floater_preview_animation.xml | 16 +- .../xui/es/floater_preview_embedded_texture.xml | 14 +- .../default/xui/es/floater_preview_gesture.xml | 124 +-- .../default/xui/es/floater_preview_notecard.xml | 32 +- .../es/floater_preview_notecard_keep_discard.xml | 34 +- .../skins/default/xui/es/floater_preview_sound.xml | 16 +- .../default/xui/es/floater_preview_texture.xml | 18 +- .../es/floater_preview_texture_keep_discard.xml | 22 +- .../default/xui/es/floater_price_for_listing.xml | 36 +- .../skins/default/xui/es/floater_profile.xml | 8 +- .../skins/default/xui/es/floater_report_abuse.xml | 364 +++---- .../skins/default/xui/es/floater_script_debug.xml | 12 +- .../default/xui/es/floater_script_ed_panel.xml | 86 +- .../default/xui/es/floater_script_preview.xml | 12 +- .../skins/default/xui/es/floater_script_queue.xml | 8 +- .../skins/default/xui/es/floater_sell_land.xml | 140 +-- .../default/xui/es/floater_settings_debug.xml | 34 +- .../skins/default/xui/es/floater_snapshot.xml | 274 ++--- .../skins/default/xui/es/floater_sound_preview.xml | 22 +- .../skins/default/xui/es/floater_telehub.xml | 64 +- .../skins/default/xui/es/floater_texture_ctrl.xml | 48 +- .../skins/default/xui/es/floater_top_objects.xml | 116 +-- .../newview/skins/default/xui/es/floater_tos.xml | 32 +- .../default/xui/es/floater_wearable_save_as.xml | 22 +- .../skins/default/xui/es/floater_world_map.xml | 122 +-- .../skins/default/xui/es/menu_inventory.xml | 132 +-- .../skins/default/xui/es/menu_pie_attachment.xml | 30 +- .../skins/default/xui/es/menu_pie_avatar.xml | 36 +- .../newview/skins/default/xui/es/menu_pie_land.xml | 20 +- .../skins/default/xui/es/menu_pie_object.xml | 60 +- .../newview/skins/default/xui/es/menu_pie_self.xml | 58 +- .../newview/skins/default/xui/es/menu_viewer.xml | 422 ++++---- .../indra/newview/skins/default/xui/es/notify.xml | 6 +- .../default/xui/es/panel_avatar_classified.xml | 74 +- .../skins/default/xui/es/panel_avatar_pick.xml | 20 +- .../skins/default/xui/es/panel_chat_bar.xml | 40 +- .../skins/default/xui/es/panel_classified.xml | 62 +- .../newview/skins/default/xui/es/panel_event.xml | 140 +-- .../newview/skins/default/xui/es/panel_group.xml | 26 +- .../skins/default/xui/es/panel_group_finder.xml | 18 +- .../skins/default/xui/es/panel_group_general.xml | 160 +-- .../skins/default/xui/es/panel_group_invite.xml | 48 +- .../default/xui/es/panel_group_land_money.xml | 164 +-- .../skins/default/xui/es/panel_group_notices.xml | 132 +-- .../skins/default/xui/es/panel_group_roles.xml | 316 +++--- .../skins/default/xui/es/panel_group_voting.xml | 224 ++--- .../skins/default/xui/es/panel_land_covenant.xml | 78 +- .../newview/skins/default/xui/es/panel_login.xml | 86 +- .../skins/default/xui/es/panel_overlaybar.xml | 40 +- .../newview/skins/default/xui/es/panel_place.xml | 80 +- .../skins/default/xui/es/panel_place_small.xml | 92 +- .../default/xui/es/panel_preferences_audio.xml | 48 +- .../default/xui/es/panel_preferences_chat.xml | 116 +-- .../default/xui/es/panel_preferences_general.xml | 294 +++--- .../default/xui/es/panel_preferences_graphics1.xml | 356 +++---- .../skins/default/xui/es/panel_preferences_im.xml | 68 +- .../default/xui/es/panel_preferences_input.xml | 64 +- .../default/xui/es/panel_preferences_network.xml | 46 +- .../default/xui/es/panel_preferences_popups.xml | 36 +- .../skins/default/xui/es/panel_region_covenant.xml | 164 +-- .../skins/default/xui/es/panel_region_debug.xml | 80 +- .../skins/default/xui/es/panel_region_estate.xml | 138 +-- .../skins/default/xui/es/panel_region_general.xml | 118 +-- .../skins/default/xui/es/panel_region_terrain.xml | 54 +- .../skins/default/xui/es/panel_region_texture.xml | 114 +-- .../skins/default/xui/es/panel_scrolling_param.xml | 20 +- .../newview/skins/default/xui/es/panel_toolbar.xml | 34 +- .../skins/default/xui/es/panel_top_pick.xml | 20 +- .../skins/default/xui/fr/floater_about_land.xml | 1062 ++++++++++---------- .../skins/default/xui/fr/floater_avatar_picker.xml | 84 +- .../default/xui/fr/floater_avatar_textures.xml | 62 +- .../skins/default/xui/fr/floater_beacons.xml | 30 +- .../skins/default/xui/fr/floater_buy_contents.xml | 42 +- .../skins/default/xui/fr/floater_buy_currency.xml | 138 +-- .../skins/default/xui/fr/floater_buy_land.xml | 486 ++++----- .../skins/default/xui/fr/floater_chat_history.xml | 182 ++-- .../skins/default/xui/fr/floater_customize.xml | 956 +++++++++--------- .../skins/default/xui/fr/floater_directory.xml | 854 ++++++++-------- .../skins/default/xui/fr/floater_god_tools.xml | 222 ++-- .../skins/default/xui/fr/floater_group_info.xml | 522 +++++----- .../newview/skins/default/xui/fr/floater_im.xml | 90 +- .../xui/fr/floater_instant_message_group.xml | 96 +- .../skins/default/xui/fr/floater_inventory.xml | 110 +- .../xui/fr/floater_inventory_view_finder.xml | 48 +- .../skins/default/xui/fr/floater_joystick.xml | 170 ++-- .../skins/default/xui/fr/floater_land_holdings.xml | 80 +- .../default/xui/fr/floater_live_lsleditor.xml | 24 +- .../skins/default/xui/fr/floater_media_browser.xml | 40 +- .../skins/default/xui/fr/floater_mem_leaking.xml | 36 +- .../default/xui/fr/floater_name_description.xml | 22 +- .../default/xui/fr/floater_preview_gesture.xml | 132 +-- .../skins/default/xui/fr/floater_profile.xml | 8 +- .../skins/default/xui/fr/floater_report_abuse.xml | 366 +++---- .../skins/default/xui/fr/floater_sell_land.xml | 144 +-- .../skins/default/xui/fr/floater_snapshot.xml | 274 ++--- .../skins/default/xui/fr/floater_sound_preview.xml | 56 +- .../skins/default/xui/fr/floater_top_objects.xml | 110 +- .../skins/default/xui/fr/floater_world_map.xml | 150 +-- .../skins/default/xui/fr/menu_inventory.xml | 132 +-- .../newview/skins/default/xui/fr/menu_login.xml | 26 +- .../skins/default/xui/fr/menu_pie_attachment.xml | 30 +- .../skins/default/xui/fr/menu_pie_avatar.xml | 36 +- .../skins/default/xui/fr/menu_pie_object.xml | 60 +- .../newview/skins/default/xui/fr/menu_viewer.xml | 438 ++++---- .../newview/skins/default/xui/fr/panel_audio.xml | 20 +- .../default/xui/fr/panel_avatar_classified.xml | 74 +- .../skins/default/xui/fr/panel_classified.xml | 62 +- .../newview/skins/default/xui/fr/panel_event.xml | 140 +-- .../newview/skins/default/xui/fr/panel_friends.xml | 40 +- .../skins/default/xui/fr/panel_group_general.xml | 152 +-- .../skins/default/xui/fr/panel_group_invite.xml | 52 +- .../default/xui/fr/panel_group_land_money.xml | 166 +-- .../skins/default/xui/fr/panel_group_roles.xml | 320 +++--- .../newview/skins/default/xui/fr/panel_login.xml | 104 +- .../skins/default/xui/fr/panel_media_controls.xml | 76 +- .../default/xui/fr/panel_media_remote_expanded.xml | 56 +- .../skins/default/xui/fr/panel_overlaybar.xml | 40 +- .../newview/skins/default/xui/fr/panel_place.xml | 78 +- .../skins/default/xui/fr/panel_place_small.xml | 86 +- .../default/xui/fr/panel_preferences_audio.xml | 52 +- .../default/xui/fr/panel_preferences_general.xml | 296 +++--- .../skins/default/xui/fr/panel_preferences_im.xml | 64 +- .../default/xui/fr/panel_preferences_input.xml | 60 +- .../default/xui/fr/panel_preferences_network.xml | 46 +- .../default/xui/fr/panel_preferences_voice.xml | 72 +- .../skins/default/xui/fr/panel_region_covenant.xml | 164 +-- .../skins/default/xui/fr/panel_region_debug.xml | 80 +- .../skins/default/xui/fr/panel_region_general.xml | 118 +-- .../skins/default/xui/fr/panel_voice_controls.xml | 20 +- .../newview/skins/default/xui/fr/role_actions.xml | 402 ++++---- .../skins/default/xui/fr/teleport_strings.xml | 154 +-- .../default/xui/ja/floater_active_speakers.xml | 24 +- .../xui/ja/floater_instant_message_ad_hoc.xml | 114 +-- .../xui/ja/floater_instant_message_group.xml | 158 +-- .../skins/default/xui/ja/floater_joystick.xml | 250 ++--- .../skins/default/xui/ja/floater_media_browser.xml | 38 +- .../default/xui/ja/floater_windlight_options.xml | 380 +++---- .../newview/skins/default/xui/ja/menu_login.xml | 26 +- .../newview/skins/default/xui/ja/panel_friends.xml | 106 +- .../skins/default/xui/ja/panel_media_controls.xml | 90 +- .../default/xui/ja/panel_media_remote_expanded.xml | 56 +- .../default/xui/ja/panel_preferences_voice.xml | 72 +- .../default/xui/ja/panel_speaker_controls.xml | 82 +- .../skins/default/xui/ja/teleport_strings.xml | 158 +-- .../skins/default/xui/ko/panel_media_controls.xml | 76 +- .../newview/skins/default/xui/pt/floater_about.xml | 72 +- .../skins/default/xui/pt/floater_about_land.xml | 1050 +++++++++---------- .../default/xui/pt/floater_active_speakers.xml | 22 +- .../default/xui/pt/floater_animation_preview.xml | 328 +++--- .../skins/default/xui/pt/floater_auction.xml | 18 +- .../skins/default/xui/pt/floater_avatar_picker.xml | 84 +- .../default/xui/pt/floater_avatar_textures.xml | 60 +- .../skins/default/xui/pt/floater_beacons.xml | 30 +- .../skins/default/xui/pt/floater_build_options.xml | 16 +- .../newview/skins/default/xui/pt/floater_bumps.xml | 42 +- .../skins/default/xui/pt/floater_buy_contents.xml | 42 +- .../skins/default/xui/pt/floater_buy_currency.xml | 136 +-- .../skins/default/xui/pt/floater_buy_land.xml | 484 ++++----- .../skins/default/xui/pt/floater_buy_object.xml | 52 +- .../skins/default/xui/pt/floater_chat_history.xml | 182 ++-- .../skins/default/xui/pt/floater_color_picker.xml | 64 +- .../skins/default/xui/pt/floater_critical.xml | 22 +- .../skins/default/xui/pt/floater_customize.xml | 966 +++++++++--------- .../default/xui/pt/floater_day_cycle_options.xml | 134 +-- .../skins/default/xui/pt/floater_directory.xml | 796 +++++++-------- .../skins/default/xui/pt/floater_env_settings.xml | 50 +- .../skins/default/xui/pt/floater_gesture.xml | 30 +- .../skins/default/xui/pt/floater_god_tools.xml | 212 ++-- .../skins/default/xui/pt/floater_group_info.xml | 546 +++++----- .../newview/skins/default/xui/pt/floater_im.xml | 90 +- .../skins/default/xui/pt/floater_image_preview.xml | 106 +- .../skins/default/xui/pt/floater_inspect.xml | 22 +- .../xui/pt/floater_instant_message_ad_hoc.xml | 78 +- .../xui/pt/floater_instant_message_group.xml | 84 +- .../skins/default/xui/pt/floater_inventory.xml | 94 +- .../xui/pt/floater_inventory_item_properties.xml | 170 ++-- .../xui/pt/floater_inventory_view_finder.xml | 48 +- .../skins/default/xui/pt/floater_joystick.xml | 172 ++-- .../skins/default/xui/pt/floater_lagmeter.xml | 310 +++--- .../skins/default/xui/pt/floater_land_holdings.xml | 78 +- .../skins/default/xui/pt/floater_landmark_ctrl.xml | 20 +- .../default/xui/pt/floater_live_lsleditor.xml | 24 +- .../skins/default/xui/pt/floater_lsl_guide.xml | 14 +- .../skins/default/xui/pt/floater_media_browser.xml | 40 +- .../skins/default/xui/pt/floater_moveview.xml | 22 +- .../newview/skins/default/xui/pt/floater_mute.xml | 14 +- .../skins/default/xui/pt/floater_mute_object.xml | 24 +- .../default/xui/pt/floater_name_description.xml | 22 +- .../default/xui/pt/floater_new_outfit_dialog.xml | 176 ++-- .../skins/default/xui/pt/floater_openobject.xml | 16 +- .../newview/skins/default/xui/pt/floater_pay.xml | 40 +- .../skins/default/xui/pt/floater_postcard.xml | 80 +- .../skins/default/xui/pt/floater_preferences.xml | 18 +- .../default/xui/pt/floater_preview_animation.xml | 16 +- .../default/xui/pt/floater_preview_classified.xml | 4 +- .../skins/default/xui/pt/floater_preview_event.xml | 4 +- .../default/xui/pt/floater_preview_gesture.xml | 126 +-- .../pt/floater_preview_notecard_keep_discard.xml | 34 +- .../skins/default/xui/pt/floater_preview_sound.xml | 16 +- .../skins/default/xui/pt/floater_preview_url.xml | 4 +- .../default/xui/pt/floater_price_for_listing.xml | 34 +- .../skins/default/xui/pt/floater_profile.xml | 8 +- .../skins/default/xui/pt/floater_report_abuse.xml | 362 +++---- .../skins/default/xui/pt/floater_script_debug.xml | 12 +- .../skins/default/xui/pt/floater_script_queue.xml | 8 +- .../skins/default/xui/pt/floater_sell_land.xml | 142 +-- .../default/xui/pt/floater_settings_debug.xml | 34 +- .../default/xui/pt/floater_sim_release_message.xml | 32 +- .../skins/default/xui/pt/floater_snapshot.xml | 274 ++--- .../skins/default/xui/pt/floater_sound_preview.xml | 22 +- .../skins/default/xui/pt/floater_telehub.xml | 64 +- .../skins/default/xui/pt/floater_texture_ctrl.xml | 46 +- .../skins/default/xui/pt/floater_top_objects.xml | 116 +-- .../newview/skins/default/xui/pt/floater_tos.xml | 32 +- .../skins/default/xui/pt/floater_url_entry.xml | 26 +- .../newview/skins/default/xui/pt/floater_water.xml | 172 ++-- .../default/xui/pt/floater_wearable_save_as.xml | 22 +- .../default/xui/pt/floater_windlight_options.xml | 374 +++---- .../skins/default/xui/pt/floater_world_map.xml | 114 +-- .../skins/default/xui/pt/menu_inventory.xml | 132 +-- .../skins/default/xui/pt/menu_pie_attachment.xml | 30 +- .../skins/default/xui/pt/menu_pie_avatar.xml | 36 +- .../newview/skins/default/xui/pt/menu_pie_land.xml | 20 +- .../skins/default/xui/pt/menu_pie_object.xml | 60 +- .../newview/skins/default/xui/pt/menu_viewer.xml | 422 ++++---- .../skins/default/xui/pt/panel_audio_device.xml | 50 +- .../default/xui/pt/panel_avatar_classified.xml | 72 +- .../skins/default/xui/pt/panel_avatar_pick.xml | 20 +- .../skins/default/xui/pt/panel_chat_bar.xml | 40 +- .../skins/default/xui/pt/panel_classified.xml | 60 +- .../newview/skins/default/xui/pt/panel_event.xml | 140 +-- .../newview/skins/default/xui/pt/panel_friends.xml | 40 +- .../newview/skins/default/xui/pt/panel_group.xml | 26 +- .../skins/default/xui/pt/panel_group_finder.xml | 18 +- .../skins/default/xui/pt/panel_group_general.xml | 152 +-- .../skins/default/xui/pt/panel_group_invite.xml | 46 +- .../default/xui/pt/panel_group_land_money.xml | 162 +-- .../skins/default/xui/pt/panel_group_notices.xml | 138 +-- .../skins/default/xui/pt/panel_group_roles.xml | 292 +++--- .../skins/default/xui/pt/panel_group_voting.xml | 226 ++--- .../skins/default/xui/pt/panel_land_covenant.xml | 78 +- .../newview/skins/default/xui/pt/panel_login.xml | 74 +- .../skins/default/xui/pt/panel_overlaybar.xml | 32 +- .../newview/skins/default/xui/pt/panel_place.xml | 78 +- .../skins/default/xui/pt/panel_place_small.xml | 84 +- .../default/xui/pt/panel_preferences_audio.xml | 46 +- .../default/xui/pt/panel_preferences_chat.xml | 118 +-- .../default/xui/pt/panel_preferences_general.xml | 294 +++--- .../default/xui/pt/panel_preferences_graphics1.xml | 354 +++---- .../skins/default/xui/pt/panel_preferences_im.xml | 66 +- .../default/xui/pt/panel_preferences_input.xml | 66 +- .../default/xui/pt/panel_preferences_network.xml | 46 +- .../default/xui/pt/panel_preferences_popups.xml | 36 +- .../default/xui/pt/panel_preferences_voice.xml | 72 +- .../skins/default/xui/pt/panel_preferences_web.xml | 56 +- .../skins/default/xui/pt/panel_region_covenant.xml | 168 ++-- .../skins/default/xui/pt/panel_region_debug.xml | 80 +- .../skins/default/xui/pt/panel_region_estate.xml | 138 +-- .../skins/default/xui/pt/panel_region_general.xml | 118 +-- .../skins/default/xui/pt/panel_region_terrain.xml | 54 +- .../skins/default/xui/pt/panel_region_texture.xml | 114 +-- .../skins/default/xui/pt/panel_scrolling_param.xml | 20 +- .../default/xui/pt/panel_speaker_controls.xml | 82 +- .../newview/skins/default/xui/pt/panel_toolbar.xml | 34 +- .../skins/default/xui/pt/panel_top_pick.xml | 20 +- .../skins/default/xui/pt/panel_voice_controls.xml | 14 +- .../skins/default/xui/pt/panel_voice_enable.xml | 46 +- .../skins/default/xui/pt/panel_voice_options.xml | 42 +- .../skins/default/xui/pt/teleport_strings.xml | 150 +-- .../skins/default/xui/zh/floater_env_settings.xml | 108 +- .../xui/zh/floater_instant_message_ad_hoc.xml | 78 +- .../skins/default/xui/zh/floater_lagmeter.xml | 290 +++--- .../skins/default/xui/zh/floater_landmark_ctrl.xml | 74 +- .../skins/default/xui/zh/floater_post_process.xml | 234 ++--- .../default/xui/zh/floater_settings_debug.xml | 48 +- .../default/xui/zh/floater_windlight_options.xml | 378 +++---- .../skins/default/xui/zh/menu_pie_attachment.xml | 30 +- .../skins/default/xui/zh/menu_pie_avatar.xml | 38 +- 324 files changed, 20055 insertions(+), 20055 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/skins/default/xui/de/floater_active_speakers.xml b/linden/indra/newview/skins/default/xui/de/floater_active_speakers.xml index fcd4dc2..5d48c95 100644 --- a/linden/indra/newview/skins/default/xui/de/floater_active_speakers.xml +++ b/linden/indra/newview/skins/default/xui/de/floater_active_speakers.xml @@ -1,13 +1,13 @@ - - - - - - - - -