From ebdf44ec4bb94ee8f6db8ca3045a15617b252945 Mon Sep 17 00:00:00 2001 From: elektrahesse Date: Sat, 18 Sep 2010 13:33:24 +0200 Subject: Fixed a regression bug due to a refactor --- linden/indra/newview/llchatbar.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp index 0a4ca34..a22fd8f 100644 --- a/linden/indra/newview/llchatbar.cpp +++ b/linden/indra/newview/llchatbar.cpp @@ -215,6 +215,7 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask ) { if (mInputEditor) { + mInputEditor->deleteSelection(); // Clean up prev completion before attempting a new one std::string txt(mInputEditor->getText()); std::vector avatar_ids; @@ -223,8 +224,6 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask ) if (!avatar_ids.empty() && !txt.empty()) { - mInputEditor->deleteSelection(); // Clean up prev completion before attempting a new one - S32 cursorPos = mInputEditor->getCursor(); if (mCompletionHolder.last_txt != mInputEditor->getText()) -- cgit v1.1 From d3d73852ec3d75a70534d34aaee59217d0037f02 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sun, 19 Sep 2010 00:56:33 -0700 Subject: Changed ResetFocusOnSelfClick to default to false. TODO: investigate a better way of handling this --- linden/indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 0a27aa2..a0f33cb 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -746,7 +746,7 @@ Type Boolean Value - 0 + 1 RezWithLandGroup -- cgit v1.1 From 23e3e4f5353a280944992bd2839e3aecadca3412 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sun, 19 Sep 2010 01:13:22 -0700 Subject: Show start location on the login screen by default --- linden/indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index a0f33cb..ee8f76e 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -10672,7 +10672,7 @@ Type Boolean Value - 0 + 1 ShowTangentBasis -- cgit v1.1 From 7d524c7470b9846148cac9516a7686ba0d9608f7 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sun, 19 Sep 2010 08:16:14 -0700 Subject: Added safety checks for when snapshot window goes out of sync with the main UI, as well as a few backported changes from Viewer 2 --- linden/indra/newview/llfloatersnapshot.cpp | 219 ++++++++++++++++------------- 1 file changed, 121 insertions(+), 98 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llfloatersnapshot.cpp b/linden/indra/newview/llfloatersnapshot.cpp index f67340e..9e8c38b 100644 --- a/linden/indra/newview/llfloatersnapshot.cpp +++ b/linden/indra/newview/llfloatersnapshot.cpp @@ -366,6 +366,7 @@ void LLSnapshotLivePreview::setSnapshotQuality(S32 quality) { mSnapshotQuality = quality; gSavedSettings.setS32("SnapshotQuality", quality); + mSnapshotUpToDate = FALSE; } } @@ -777,8 +778,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) previewp->getWindow()->incBusyCount(); previewp->mImageScaled[previewp->mCurImageIndex] = FALSE; - int res = 1; - res = (gSavedSettings.getBOOL("HighResSnapshot") && previewp->getSnapshotType() == SNAPSHOT_LOCAL) ? 2 : 1; + int res = (gSavedSettings.getBOOL("HighResSnapshot") && previewp->getSnapshotType() == SNAPSHOT_LOCAL) ? 2 : 1; if(gViewerWindow->rawSnapshot( previewp->mPreviewImage, @@ -891,16 +891,16 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) previewp->mPosTakenGlobal = gAgent.getCameraPositionGlobal(); previewp->mShineCountdown = 4; // wait a few frames to avoid animation glitch due to readback this frame } - previewp->getWindow()->decBusyCount(); - // only show fullscreen preview when in freeze frame mode - previewp->setVisible(gSavedSettings.getBOOL("UseFreezeFrame")); - previewp->mSnapshotDelayTimer.stop(); - previewp->mSnapshotActive = FALSE; + } + previewp->getWindow()->decBusyCount(); + // only show fullscreen preview when in freeze frame mode + previewp->setVisible(gSavedSettings.getBOOL("UseFreezeFrame")); + previewp->mSnapshotDelayTimer.stop(); + previewp->mSnapshotActive = FALSE; - if(!previewp->getThumbnailUpToDate()) - { - previewp->generateThumbnailImage() ; - } + if(!previewp->getThumbnailUpToDate()) + { + previewp->generateThumbnailImage() ; } return TRUE; @@ -1025,7 +1025,8 @@ class LLFloaterSnapshot::Impl public: Impl() : mAvatarPauseHandles(), - mLastToolset(NULL) + mLastToolset(NULL), + mAspectRatioCheckOff(false) { } ~Impl() @@ -1064,9 +1065,6 @@ public: static void updateLayout(LLFloaterSnapshot* floater); static void updateResolutionTextEntry(LLFloaterSnapshot* floater); - static LLHandle sPreviewHandle; - static BOOL sAspectRatioCheckOff ; - private: static LLSnapshotLivePreview::ESnapshotType getTypeIndex(LLFloaterSnapshot* floater); static ESnapshotFormat getFormatIndex(LLFloaterSnapshot* floater); @@ -1079,18 +1077,14 @@ public: std::vector mAvatarPauseHandles; LLToolset* mLastToolset; + LLHandle mPreviewHandle; + bool mAspectRatioCheckOff ; }; // static -LLHandle LLFloaterSnapshot::Impl::sPreviewHandle; - -//static -BOOL LLFloaterSnapshot::Impl::sAspectRatioCheckOff = FALSE ; - -// static LLSnapshotLivePreview* LLFloaterSnapshot::Impl::getPreviewView(LLFloaterSnapshot *floater) { - LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)sPreviewHandle.get(); + LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)floater->impl.mPreviewHandle.get(); return previewp; } @@ -1098,14 +1092,17 @@ LLSnapshotLivePreview* LLFloaterSnapshot::Impl::getPreviewView(LLFloaterSnapshot LLSnapshotLivePreview::ESnapshotType LLFloaterSnapshot::Impl::getTypeIndex(LLFloaterSnapshot* floater) { LLSnapshotLivePreview::ESnapshotType index = LLSnapshotLivePreview::SNAPSHOT_POSTCARD; - LLSD value = floater->childGetValue("snapshot_type_radio"); - const std::string id = value.asString(); - if (id == "postcard") - index = LLSnapshotLivePreview::SNAPSHOT_POSTCARD; - else if (id == "texture") - index = LLSnapshotLivePreview::SNAPSHOT_TEXTURE; - else if (id == "local") - index = LLSnapshotLivePreview::SNAPSHOT_LOCAL; + LLRadioGroup* snapshot_type_radio = floater->getChild("snapshot_type_radio"); + if (snapshot_type_radio) + { + const std::string id = snapshot_type_radio->getSelectedValue().asString(); + if (id == "postcard") + index = LLSnapshotLivePreview::SNAPSHOT_POSTCARD; + else if (id == "texture") + index = LLSnapshotLivePreview::SNAPSHOT_TEXTURE; + else if (id == "local") + index = LLSnapshotLivePreview::SNAPSHOT_LOCAL; + } return index; } @@ -1114,16 +1111,19 @@ LLSnapshotLivePreview::ESnapshotType LLFloaterSnapshot::Impl::getTypeIndex(LLFlo LLFloaterSnapshot::ESnapshotFormat LLFloaterSnapshot::Impl::getFormatIndex(LLFloaterSnapshot* floater) { ESnapshotFormat index = SNAPSHOT_FORMAT_PNG; - LLSD value = floater->childGetValue("local_format_combo"); - const std::string id = value.asString(); - if (id == "PNG") - index = SNAPSHOT_FORMAT_PNG; - else if (id == "JPEG") - index = SNAPSHOT_FORMAT_JPEG; - else if (id == "TGA") - index = SNAPSHOT_FORMAT_TGA; - else if (id == "BMP") - index = SNAPSHOT_FORMAT_BMP; + if(floater->hasChild("local_format_combo")) + { + LLComboBox* local_format_combo = floater->getChild("local_format_combo"); + const std::string id = local_format_combo->getSelectedItemLabel(); + if (id == "PNG") + index = SNAPSHOT_FORMAT_PNG; + else if (id == "JPEG") + index = SNAPSHOT_FORMAT_JPEG; + else if (id == "TGA") + index = SNAPSHOT_FORMAT_TGA; + else if (id == "BMP") + index = SNAPSHOT_FORMAT_BMP; + } return index; } @@ -1133,14 +1133,17 @@ LLFloaterSnapshot::ESnapshotFormat LLFloaterSnapshot::Impl::getFormatIndex(LLFlo LLViewerWindow::ESnapshotType LLFloaterSnapshot::Impl::getLayerType(LLFloaterSnapshot* floater) { LLViewerWindow::ESnapshotType type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; - LLSD value = floater->childGetValue("layer_types"); - const std::string id = value.asString(); - if (id == "colors") - type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; - else if (id == "depth") - type = LLViewerWindow::SNAPSHOT_TYPE_DEPTH; - else if (id == "objects") - type = LLViewerWindow::SNAPSHOT_TYPE_OBJECT_ID; + if(floater->hasChild("layer_types")) + { + LLComboBox* layer_types = floater->getChild("layer_types"); + const std::string id = layer_types->getSelectedItemLabel(); + if (id == "colors") + type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; + else if (id == "depth") + type = LLViewerWindow::SNAPSHOT_TYPE_DEPTH; + else if (id == "objects") + type = LLViewerWindow::SNAPSHOT_TYPE_OBJECT_ID; + } return type; } @@ -1199,7 +1202,7 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) iter != LLCharacter::sInstances.end(); ++iter) { avatarp = *iter; - sInstance->impl.mAvatarPauseHandles.push_back(avatarp->requestPause()); + floaterp->impl.mAvatarPauseHandles.push_back(avatarp->requestPause()); } // freeze everything else @@ -1207,7 +1210,7 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) if (LLToolMgr::getInstance()->getCurrentToolset() != gCameraToolset) { - sInstance->impl.mLastToolset = LLToolMgr::getInstance()->getCurrentToolset(); + floaterp->impl.mLastToolset = LLToolMgr::getInstance()->getCurrentToolset(); LLToolMgr::getInstance()->setCurrentToolset(gCameraToolset); } } @@ -1222,15 +1225,15 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) } //RN: thaw all avatars - sInstance->impl.mAvatarPauseHandles.clear(); + floaterp->impl.mAvatarPauseHandles.clear(); // thaw everything else gSavedSettings.setBOOL("FreezeTime", FALSE); // restore last tool (e.g. pie menu, etc) - if (sInstance->impl.mLastToolset) + if (floaterp->impl.mLastToolset) { - LLToolMgr::getInstance()->setCurrentToolset(sInstance->impl.mLastToolset); + LLToolMgr::getInstance()->setCurrentToolset(floaterp->impl.mLastToolset); } } } @@ -1243,8 +1246,28 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) // static void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) { + std::string fee = gHippoGridManager->getConnectedGrid()->getUploadFee(); + floater->childSetLabelArg("upload_btn", "[UPLOADFEE]", fee); + LLRadioGroup* snapshot_type_radio = floater->getChild("snapshot_type_radio"); - snapshot_type_radio->setSelectedIndex(gSavedSettings.getS32("LastSnapshotType")); + if (snapshot_type_radio) + { + snapshot_type_radio->setSelectedIndex(gSavedSettings.getS32("LastSnapshotType")); + + const child_list_t *childs = snapshot_type_radio->getChildList(); + if (childs) + { + child_list_t::const_iterator it, end=childs->end(); + for (it=childs->begin(); it!=end; ++it) + { + LLRadioCtrl *ctrl = dynamic_cast(*it); + if (ctrl && (ctrl->getName() == "texture")) + { + ctrl->setLabelArg("[UPLOADFEE]", fee); + } + } + } + } LLSnapshotLivePreview::ESnapshotType shot_type = getTypeIndex(floater); ESnapshotFormat shot_format = (ESnapshotFormat)gSavedSettings.getS32("SnapshotFormat"); //getFormatIndex(floater); LLViewerWindow::ESnapshotType layer_type = getLayerType(floater); LLViewerWindow::ESnapshotType layer_type = getLayerType(floater); @@ -1258,25 +1281,10 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) floater->getChild("local_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotLocalLastResolution")); floater->getChild("local_format_combo")->selectNthItem(gSavedSettings.getS32("SnapshotFormat")); - std::string fee = gHippoGridManager->getConnectedGrid()->getUploadFee(); - floater->childSetLabelArg("upload_btn", "[UPLOADFEE]", fee); - - if (snapshot_type_radio) { - const child_list_t *childs = snapshot_type_radio->getChildList(); - if (childs) { - child_list_t::const_iterator it, end=childs->end(); - for (it=childs->begin(); it!=end; ++it) { - LLRadioCtrl *ctrl = dynamic_cast(*it); - if (ctrl && (ctrl->getName() == "texture")) - ctrl->setLabelArg("[UPLOADFEE]", fee); - } - } - } - floater->childSetVisible("upload_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE); floater->childSetVisible("send_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD); floater->childSetVisible("save_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL); - floater->childSetEnabled("keep_aspect_check", shot_type != LLSnapshotLivePreview::SNAPSHOT_TEXTURE && !sAspectRatioCheckOff); + floater->childSetEnabled("keep_aspect_check", shot_type != LLSnapshotLivePreview::SNAPSHOT_TEXTURE && !floater->impl.mAspectRatioCheckOff); floater->childSetEnabled("layer_types", shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL); if(shot_type != LLSnapshotLivePreview::SNAPSHOT_TEXTURE) { @@ -1308,7 +1316,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) LLSnapshotLivePreview* previewp = getPreviewView(floater); BOOL got_bytes = previewp && previewp->getDataSize() > 0; - BOOL got_snap = previewp->getSnapshotUpToDate(); + BOOL got_snap = previewp && previewp->getSnapshotUpToDate(); BOOL show_slider = shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD @@ -1321,7 +1329,10 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) LLLocale locale(LLLocale::USER_LOCALE); std::string bytes_string; - LLResMgr::getInstance()->getIntegerString(bytes_string, (previewp->getDataSize()) >> 10 ); + if (got_snap) + { + LLResMgr::getInstance()->getIntegerString(bytes_string, (previewp->getDataSize()) >> 10 ); + } S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); floater->childSetLabelArg("texture", "[AMOUNT]", llformat("%d",upload_cost)); floater->childSetLabelArg("upload_btn", "[AMOUNT]", llformat("%d",upload_cost)); @@ -1652,7 +1663,7 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde if(0 == index) //current window size { - sAspectRatioCheckOff = TRUE ; + view->impl.mAspectRatioCheckOff = true ; view->childSetEnabled("keep_aspect_check", FALSE) ; if(previewp) @@ -1662,7 +1673,7 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde } else if(-1 == index) //custom { - sAspectRatioCheckOff = FALSE ; + view->impl.mAspectRatioCheckOff = false ; //if(LLSnapshotLivePreview::SNAPSHOT_TEXTURE != gSavedSettings.getS32("LastSnapshotType")) { view->childSetEnabled("keep_aspect_check", TRUE) ; @@ -1675,7 +1686,7 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde } else { - sAspectRatioCheckOff = TRUE ; + view->impl.mAspectRatioCheckOff = true ; view->childSetEnabled("keep_aspect_check", FALSE) ; if(previewp) @@ -1832,23 +1843,25 @@ void LLFloaterSnapshot::Impl::onCommitSnapshotFormat(LLUICtrl* ctrl, void* data) void LLFloaterSnapshot::Impl::comboSetCustom(LLFloaterSnapshot* floater, const std::string& comboname) { LLComboBox* combo = floater->getChild(comboname); + if (combo) + { + combo->setCurrentByIndex(combo->getItemCount() - 1); // "custom" is always the last index - combo->setCurrentByIndex(combo->getItemCount() - 1); // "custom" is always the last index + if(comboname == "postcard_size_combo") + { + gSavedSettings.setS32("SnapshotPostcardLastResolution", combo->getCurrentIndex()); + } + else if(comboname == "texture_size_combo") + { + gSavedSettings.setS32("SnapshotTextureLastResolution", combo->getCurrentIndex()); + } + else if(comboname == "local_size_combo") + { + gSavedSettings.setS32("SnapshotLocalLastResolution", combo->getCurrentIndex()); + } - if(comboname == "postcard_size_combo") - { - gSavedSettings.setS32("SnapshotPostcardLastResolution", combo->getCurrentIndex()); - } - else if(comboname == "texture_size_combo") - { - gSavedSettings.setS32("SnapshotTextureLastResolution", combo->getCurrentIndex()); + checkAspectRatio(floater, -1); // -1 means custom } - else if(comboname == "local_size_combo") - { - gSavedSettings.setS32("SnapshotLocalLastResolution", combo->getCurrentIndex()); - } - - checkAspectRatio(floater, -1); // -1 means custom } @@ -2015,6 +2028,7 @@ LLFloaterSnapshot::LLFloaterSnapshot() : LLFloater(std::string("Snapshot Floater")), impl (*(new Impl)) { + //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_snapshot.xml", FALSE); } // Destroys the object @@ -2022,8 +2036,7 @@ LLFloaterSnapshot::~LLFloaterSnapshot() { if (sInstance == this) { - LLView::deleteViewByHandle(Impl::sPreviewHandle); - Impl::sPreviewHandle = LLHandle(); + LLView::deleteViewByHandle(impl.mPreviewHandle); sInstance = NULL; } @@ -2092,20 +2105,27 @@ BOOL LLFloaterSnapshot::postBuild() childSetCommitCallback("texture_size_combo", Impl::onCommitResolution, this); childSetCommitCallback("local_size_combo", Impl::onCommitResolution, this); + gSavedSettings.setBOOL("EmeraldTemporaryUpload",FALSE); + childSetValue("temp_check",FALSE); + // create preview window - LLRect full_screen_rect = sInstance->getRootView()->getRect(); + LLRect full_screen_rect = getRootView()->getRect(); LLSnapshotLivePreview* previewp = new LLSnapshotLivePreview(full_screen_rect); - sInstance->getRootView()->removeChild(gSnapshotFloaterView); + LLView* parent_view = gSnapshotFloaterView->getParent(); + + parent_view->removeChild(gSnapshotFloaterView); // make sure preview is below snapshot floater - sInstance->getRootView()->addChild(previewp); - sInstance->getRootView()->addChild(gSnapshotFloaterView); + parent_view->addChild(previewp); + parent_view->addChild(gSnapshotFloaterView); - gSavedSettings.setBOOL("EmeraldTemporaryUpload",FALSE); - childSetValue("temp_check",FALSE); + impl.mPreviewHandle = previewp->getHandle(); - Impl::sPreviewHandle = previewp->getHandle(); + //move snapshot floater to special purpose snapshotfloaterview + //gFloaterView->removeChild(this); + //gSnapshotFloaterView->addChild(this); impl.updateControls(this); + impl.updateLayout(this); return TRUE; } @@ -2282,6 +2302,9 @@ void LLFloaterSnapshot::hide(void*) //static void LLFloaterSnapshot::update() { + if (!sInstance) + return; + BOOL changed = FALSE; for (std::set::iterator iter = LLSnapshotLivePreview::sList.begin(); iter != LLSnapshotLivePreview::sList.end(); ++iter) -- cgit v1.1 From 070a8e6c351ac115c3063615a1a7c8a31ef33a48 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Tue, 21 Sep 2010 18:23:43 +0200 Subject: Double-click teleport: - clean up duplicated (and subtly and needlessly different) code. - keep the camera heading in inter-sim double-click teleport in a hackish way, since SL sims give LookAt info that is kind of random in AgentMovementComplete. --- linden/indra/newview/chatbar_as_cmdline.cpp | 4 +- linden/indra/newview/llagent.cpp | 81 ++++++++++++++--------------- linden/indra/newview/llagent.h | 9 +++- linden/indra/newview/llviewermenu.cpp | 4 +- linden/indra/newview/llviewermessage.cpp | 8 ++- 5 files changed, 58 insertions(+), 48 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/chatbar_as_cmdline.cpp b/linden/indra/newview/chatbar_as_cmdline.cpp index 59804c0..9359444 100644 --- a/linden/indra/newview/chatbar_as_cmdline.cpp +++ b/linden/indra/newview/chatbar_as_cmdline.cpp @@ -16,7 +16,7 @@ * may be used to endorse or promote products derived from this * software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS AND CONTRIBUTORS “AS IS” + * THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS @@ -331,7 +331,7 @@ bool cmd_line_chat(std::string revised_text, EChatType type) } else if(command == *sCmdLineChatbarTeleportToCam) { - gAgent.teleportViaLocation(gAgent.getCameraPositionGlobal()); + gAgent.teleportViaLocationLookAt(gAgent.getCameraPositionGlobal()); return false; } /*else if(command == *sCmdLineChatbarUndeform) diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 51b6c53..077da53 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp @@ -400,7 +400,8 @@ LLAgent::LLAgent() : mAgentWearablesUpdateSerialNum(0), mWearablesLoaded(FALSE), mTextureCacheQueryID(0), - mAppearanceSerialNum(0) + mAppearanceSerialNum(0), + mbTeleportKeepsLookAt(false) { U32 i; for (i = 0; i < TOTAL_CONTROLS; i++) @@ -6099,16 +6100,21 @@ bool LLAgent::teleportCore(bool is_local) void LLAgent::teleportRequest( const U64& region_handle, - const LLVector3& pos_local) + const LLVector3& pos_local, + bool keep_look_at) { LLViewerRegion* regionp = getRegion(); - + if (!regionp) + { + return; + } // Set last region data for teleport history gAgent.setLastRegionData(regionp->getName(),gAgent.getPositionAgent()); - if(regionp && teleportCore()) + bool is_local = (region_handle == to_region_handle(getPositionGlobal())); + if(teleportCore(is_local)) { - llinfos << "TeleportRequest: '" << region_handle << "':" << pos_local + llinfos << "TeleportLocationRequest: '" << region_handle << "':" << pos_local << llendl; LLMessageSystem* msg = gMessageSystem; msg->newMessage("TeleportLocationRequest"); @@ -6119,6 +6125,10 @@ void LLAgent::teleportRequest( msg->addU64("RegionHandle", region_handle); msg->addVector3("Position", pos_local); LLVector3 look_at(0,1,0); + if (keep_look_at) + { + look_at = LLViewerCamera::getInstance()->getAtAxis(); + } msg->addVector3("LookAt", look_at); sendReliableMessage(); } @@ -6219,46 +6229,29 @@ void LLAgent::teleportViaLocation(const LLVector3d& pos_global) } // [/RLVa:KB] - LLViewerRegion* regionp = getRegion(); - LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos_global); - if(regionp && info) - { - U32 x_pos; - U32 y_pos; - from_region_handle(info->mHandle, &x_pos, &y_pos); - LLVector3 pos_local( - (F32)(pos_global.mdV[VX] - x_pos), - (F32)(pos_global.mdV[VY] - y_pos), - (F32)(pos_global.mdV[VZ])); - teleportRequest(info->mHandle, pos_local); - } - else if(regionp && - teleportCore(regionp->getHandle() == to_region_handle_global((F32)pos_global.mdV[VX], (F32)pos_global.mdV[VY]))) - { - llwarns << "Using deprecated teleportlocationrequest." << llendl; - // send the message - LLMessageSystem* msg = gMessageSystem; - msg->newMessageFast(_PREHASH_TeleportLocationRequest); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, getID()); - msg->addUUIDFast(_PREHASH_SessionID, getSessionID()); + U64 region_handle = to_region_handle(pos_global); + LLVector3 pos_local = (LLVector3)(pos_global - from_region_handle(region_handle)); + teleportRequest(region_handle, pos_local, false); +} - msg->nextBlockFast(_PREHASH_Info); - F32 width = regionp->getWidth(); - LLVector3 pos(fmod((F32)pos_global.mdV[VX], width), - fmod((F32)pos_global.mdV[VY], width), - (F32)pos_global.mdV[VZ]); - F32 region_x = (F32)(pos_global.mdV[VX]); - F32 region_y = (F32)(pos_global.mdV[VY]); - U64 region_handle = to_region_handle_global(region_x, region_y); - msg->addU64Fast(_PREHASH_RegionHandle, region_handle); - msg->addVector3Fast(_PREHASH_Position, pos); - pos.mV[VX] += 1; - msg->addVector3Fast(_PREHASH_LookAt, pos); - sendReliableMessage(); +// Teleport to global position, but keep facing in the same direction +void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global) +{ + // RLVa stuff copied from LLAgent::teleportViaLocation + if ( (rlv_handler_t::isEnabled()) && + ( (gRlvHandler.hasBehaviourExcept(RLV_BHVR_TPLOC, gRlvHandler.getCurrentObject())) || + ( (mAvatarObject.notNull()) && (mAvatarObject->mIsSitting) && + (gRlvHandler.hasBehaviourExcept(RLV_BHVR_UNSIT, gRlvHandler.getCurrentObject()))) ) ) + { + return; } -} + mbTeleportKeepsLookAt = true; + setFocusOnAvatar(FALSE, ANIMATE); // detach camera form avatar, so it keeps direction + U64 region_handle = to_region_handle(pos_global); + LLVector3 pos_local = (LLVector3)(pos_global - from_region_handle(region_handle)); + teleportRequest(region_handle, pos_local, mbTeleportKeepsLookAt); +} void LLAgent::teleportHome() { @@ -6286,6 +6279,10 @@ bool LLAgent::teleportHomeCallback( const LLSD& notification, const LLSD& respon void LLAgent::setTeleportState(ETeleportState state) { mTeleportState = state; + if (mTeleportState == TELEPORT_NONE) + { + mbTeleportKeepsLookAt = false; + } if (mTeleportState > TELEPORT_NONE && gSavedSettings.getBOOL("FreezeTime")) { LLFloaterSnapshot::hide(0); diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h index 3a39448..f1cad9c 100644 --- a/linden/indra/newview/llagent.h +++ b/linden/indra/newview/llagent.h @@ -496,7 +496,8 @@ public: // go to a named location home void teleportRequest( const U64& region_handle, - const LLVector3& pos_local); + const LLVector3& pos_local, + bool keep_look_at); // teleport to a landmark void teleportViaLandmark(const LLUUID& landmark_id); @@ -513,6 +514,9 @@ public: // deprecated. void teleportViaLocation(const LLVector3d& pos_global); + // to a global location, preserving camera rotation + void teleportViaLocationLookAt(const LLVector3d& pos_global); + // cancel the teleport, may or may not be allowed by server void teleportCancel(); @@ -521,6 +525,8 @@ public: const std::string getTeleportSourceSLURL() const { return mTeleportSourceSLURL; } + // whether look-at resets after this teleport + bool getTeleportKeepsLookAt() const { return mbTeleportKeepsLookAt; } // Setting the ability for this avatar to proxy for another avatar. //static void processAddModifyAbility(LLMessageSystem* msg, void**); @@ -781,6 +787,7 @@ public: EDoubleTapRunMode mDoubleTapRunMode; private: + bool mbTeleportKeepsLookAt; bool mbAlwaysRun; // should the avatar run by default rather than walk bool mbRunning; // is the avatar trying to run right now diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index fd6e842..71938d9 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -2576,9 +2576,9 @@ bool handle_go_to_callback(const LLSD& notification, const LLSD& response) if (action == "teleport") { - LLVector3d hips_offset(0.0f, 0.0f, 1.2f); + pos.mdV[VZ] += gAgent.getAvatarObject()->getPelvisToFoot() + 0.2f; gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); - gAgent.teleportViaLocation(pos + hips_offset); + gAgent.teleportViaLocationLookAt(pos); } else if (action == "move") { diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index bfd1045..e216c44 100755 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -3540,6 +3540,12 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) if( is_teleport ) { + if (gAgent.getTeleportKeepsLookAt()) + { + // *NOTE: the LookAt data we get from the sim here doesn't + // seem to be useful, so get it from the camera instead. + look_at = LLViewerCamera::getInstance()->getAtAxis(); + } // Force the camera back onto the agent, don't animate. gAgent.setFocusOnAvatar(TRUE, FALSE); gAgent.slamLookAt(look_at); @@ -3601,7 +3607,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) { LLTracker::stopTracking(NULL); } - else if ( is_teleport ) + else if ( is_teleport && !gAgent.getTeleportKeepsLookAt() ) { //look at the beacon LLVector3 global_agent_pos = agent_pos; -- cgit v1.1 From 721c25d85b39a7b013a182cb0f60e159bfc28807 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Tue, 21 Sep 2010 23:55:50 +0200 Subject: More sanity checks in OpenJPEG decodes for #355 Patch by Carjay McGinnis from VWR-1815. This fixes decoding lossless and small textures where the viewer's assumption about compressed size breaks (i.e. discard level only half there), and also encoding small lossy textures. This relys on a patched OpenJPEG to work (see openjpeg_top_corner_fix.diff from VWR-1815.) --- linden/indra/llimagej2coj/llimagej2coj.cpp | 45 +++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 10 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/llimagej2coj/llimagej2coj.cpp b/linden/indra/llimagej2coj/llimagej2coj.cpp index b7a1b82..829dceb 100644 --- a/linden/indra/llimagej2coj/llimagej2coj.cpp +++ b/linden/indra/llimagej2coj/llimagej2coj.cpp @@ -152,8 +152,13 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod /* open a byte stream */ cio = opj_cio_open((opj_common_ptr)dinfo, base.getData(), base.getDataSize()); - /* decode the stream and fill the image structure */ - image = opj_decode(dinfo, cio); + /* decode the stream and fill the image structure, also fill in an additional + structure to get the decoding result. This structure is a bit unusual in that + it is not received through opj, but still has some dynamically allocated fields + that need to be cleared up at the end by calling a destroy function. */ + opj_codestream_info_t cinfo; + memset(&cinfo, 0, sizeof(opj_codestream_info_t)); + image = opj_decode_with_info(dinfo, cio, &cinfo); /* close the byte stream */ opj_cio_close(cio); @@ -180,6 +185,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod LL_DEBUGS("Openjpeg") << "ERROR -> decodeImpl: failed to decode image wrong number of components: " << img_components << LL_ENDL; if (image) { + opj_destroy_cstr_info(&cinfo); opj_image_destroy(image); } @@ -187,23 +193,40 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod } // sometimes we get bad data out of the cache - check to see if the decode succeeded - for (S32 i = 0; i < img_components; i++) + int decompdifference = 0; + if (cinfo.numdecompos) // sanity { - if (image->comps[i].factor != base.getRawDiscardLevel()) + for (int comp = 0; comp < image->numcomps; comp++) + { /* get maximum decomposition level difference, first field is from the COD header and the second + is what is actually met in the codestream, NB: if everything was ok, this calculation will + return what was set in the cp_reduce value! */ + decompdifference = std::max(decompdifference, cinfo.numdecompos[comp] - image->comps[comp].resno_decoded); + } + if (decompdifference < 0) // sanity { - // if we didn't get the discard level we're expecting, fail - if (image) //anyway somthing odd with the image, better check than crash - opj_image_destroy(image); - base.mDecoding = FALSE; - return TRUE; + decompdifference = 0; } } + + /* if OpenJPEG failed to decode all requested decomposition levels + the difference will be greater than this level */ + if (decompdifference > base.getRawDiscardLevel()) + { + llwarns << "not enough data for requested discard level, setting mDecoding to FALSE, difference: " << (decompdifference - base.getRawDiscardLevel()) << llendl; + opj_destroy_cstr_info(&cinfo); + opj_image_destroy(image); + base.mDecoding = FALSE; + return TRUE; + } + if(img_components <= first_channel) { + // sanity LL_DEBUGS("Openjpeg") << "trying to decode more channels than are present in image: numcomps: " << img_components << " first_channel: " << first_channel << LL_ENDL; if (image) { + opj_destroy_cstr_info(&cinfo); opj_image_destroy(image); } @@ -252,15 +275,17 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod else // Some rare OpenJPEG versions have this bug. { llwarns << "ERROR -> decodeImpl: failed to decode image! (NULL comp data - OpenJPEG bug)" << llendl; + opj_destroy_cstr_info(&cinfo); opj_image_destroy(image); return TRUE; // done } } - /* free image data structure */ + /* free opj data structures */ if (image) { + opj_destroy_cstr_info(&cinfo); opj_image_destroy(image); } -- cgit v1.1 From ceca2fbeb58be924902471ab58f5ad8a8c1fd157 Mon Sep 17 00:00:00 2001 From: Patrick Sapinski Date: Tue, 21 Sep 2010 21:40:23 -0400 Subject: Added handler for new OpenSim function "OpenRegionInfo", more info at http://imprudenceviewer.org/wiki/Opensim_information_needed Currently only supports a fraction of the provided parameters. --- linden/indra/newview/CMakeLists.txt | 1 + linden/indra/newview/app_settings/settings.xml | 14 ++++++++++++++ linden/indra/newview/hippoLimits.h | 2 +- linden/indra/newview/llviewermenu.cpp | 15 ++++++++++----- .../indra/newview/skins/default/xui/en-us/menu_viewer.xml | 2 +- 5 files changed, 27 insertions(+), 7 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index 1691095..b071795 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt @@ -90,6 +90,7 @@ set(viewer_SOURCE_FILES impprefsfonts.cpp jcfloater_animation_list.cpp jcfloaterareasearch.cpp + kowopenregionsettings.cpp lightshare.cpp llagent.cpp llagentaccess.cpp diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index ee8f76e..70659f8 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -1168,6 +1168,20 @@ 1 + + + ToggleTeenMode + + Comment + Allow the toggle of Teen Mode via debug options + Persist + 0 + Type + Boolean + Value + 1 + + AOEnabled diff --git a/linden/indra/newview/hippoLimits.h b/linden/indra/newview/hippoLimits.h index f76e7e9..a5fe351 100644 --- a/linden/indra/newview/hippoLimits.h +++ b/linden/indra/newview/hippoLimits.h @@ -19,7 +19,6 @@ public: void setLimits(); -private: S32 mMaxAgentGroups; F32 mMaxHeight; @@ -29,6 +28,7 @@ private: F32 mMinPrimScale; S32 mMaxLinkedPrims; +private: void setOpenSimLimits(); void setSecondLifeLimits(); }; diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index fd6e842..681216a 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -7137,11 +7137,16 @@ void handle_test_female(void*) void handle_toggle_pg(void*) { - gAgent.setTeen( !gAgent.isTeen() ); - - LLFloaterWorldMap::reloadIcons(NULL); - - llinfos << "PG status set to " << (S32)gAgent.isTeen() << llendl; + if(gSavedSettings.getBOOL("ToggleTeenMode")) + { + gAgent.setTeen( !gAgent.isTeen() ); + LLFloaterWorldMap::reloadIcons(NULL); + llinfos << "PG status set to " << (S32)gAgent.isTeen() << llendl; + } + else + { + llinfos << "Teen mode cannot be toggled on this region" << llendl; + } } void handle_dump_attachments(void*) diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index fffab6c..0a27f85 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -1803,7 +1803,7 @@ - + setLimits(); + + //limits are also reset in llviewermessage.cpp when we detect a new server + //version, in case the destination simulator does not support OpenRegionInfo. + + BOOL limitschanged = FALSE; + + if ( body.has("AllowMinimap") ) + { + //IMPLEMENT ME + } + if ( body.has("AllowPhysicalPrims") ) + { + //IMPLEMENT ME + } + if ( body.has("DrawDistance") ) + { + //IMPLEMENT ME + } + if ( body.has("ForceDrawDistance") ) + { + //IMPLEMENT ME + } + if ( body.has("LSLFunctions") ) + { + //IMPLEMENT ME + } + if ( body.has("MaxDragDistance") ) + { + //IMPLEMENT ME + } + if ( body.has("MinHoleSize") ) + { + gHippoLimits->mMinHoleSize = body["MinHoleSize"].asReal(); + } + if ( body.has("MaxHollowSize") ) + { + gHippoLimits->mMaxHollow = body["MaxHollowSize"].asReal(); + } + if ( body.has("MaxInventoryItemsTransfer") ) + { + //IMPLEMENT ME + } + if ( body.has("MaxLinkCount") ) + { + gHippoLimits->mMaxLinkedPrims = body["MaxLinkCount"].asInteger(); + } + if ( body.has("MaxLinkCountPhys") ) + { + //IMPLEMENT ME + } + if ( body.has("MaxPhysPrimScale") ) + { + //IMPLEMENT ME + } + if ( body.has("MaxPos") ) + { + //IMPLEMENT ME + } + if ( body.has("MaxPrimScale") ) + { + gHippoLimits->mMaxPrimScale = body["MaxPrimScale"].asReal(); + limitschanged = TRUE; + } + if ( body.has("MinPos") ) + { + //IMPLEMENT ME + } + if ( body.has("MinPrimScale") ) + { + gHippoLimits->mMinPrimScale = body["MinPrimScale"].asReal(); + limitschanged = TRUE; + } + if ( body.has("OffsetOfUTC") ) + { + //IMPLEMENT ME + } + if ( body.has("RenderWater") ) + { + gSavedSettings.setBOOL("RenderWater", body["RenderWater"].asBoolean()); + } + if ( body.has("SayDistance") ) + { + //IMPLEMENT ME + } + if ( body.has("ShoutDistance") ) + { + //IMPLEMENT ME + } + if ( body.has("ToggleTeenMode") ) + { + gSavedSettings.setBOOL("ToggleTeenMode", body["ToggleTeenMode"].asBoolean()); + + } + if ( body.has("WhisperDistance") ) + { + //IMPLEMENT ME + } + + if (limitschanged) + gFloaterTools->updateToolsSizeLimits(); + } +}; + +LLHTTPRegistration +gHTTPRegistrationOpenRegionInfoUpdate( + "/message/OpenRegionInfo"); \ No newline at end of file -- cgit v1.1 From ba087058b8b5de11c8f5d641d0da89da7b4b09ef Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Mon, 20 Sep 2010 18:25:33 +0200 Subject: fix: "Random" is no integer --- linden/indra/newview/app_settings/settings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 0a27aa2..8bc8289 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -422,7 +422,7 @@ Type String Value - Random + Random LastTree @@ -433,7 +433,7 @@ Type String Value - Random + Random LastSelectedGrid -- cgit v1.1 From 306be84a044f123315d5881e0acb7c77fbd93042 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Sun, 19 Sep 2010 21:51:40 +0200 Subject: fix: cached trees + grass white on opensim issues remaining: windlight water is "flat" --- linden/indra/newview/llvograss.cpp | 5 +++-- linden/indra/newview/llvograss.h | 2 +- linden/indra/newview/llvotree.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llvograss.cpp b/linden/indra/newview/llvograss.cpp index 08f2717..35eb8fc 100644 --- a/linden/indra/newview/llvograss.cpp +++ b/linden/indra/newview/llvograss.cpp @@ -108,7 +108,9 @@ void LLVOGrass::updateSpecies() SpeciesMap::const_iterator it = sSpeciesTable.begin(); mSpecies = (*it).first; } - setTEImage(0, gImageList.getImageFromFile(sSpeciesTable[mSpecies]->mTextureName)); + + mGrassImage = gImageList.getImageFromFile(sSpeciesTable[mSpecies]->mTextureName, TRUE, TRUE); + setTEImage(0, mGrassImage); } @@ -162,7 +164,6 @@ void LLVOGrass::initClass() GrassSpeciesData* newGrass = new GrassSpeciesData(); - std::string textureName; static LLStdStringHandle texture_name_string = LLXmlTree::addAttributeString("texture_name"); diff --git a/linden/indra/newview/llvograss.h b/linden/indra/newview/llvograss.h index 682fbdb..b5182cc 100644 --- a/linden/indra/newview/llvograss.h +++ b/linden/indra/newview/llvograss.h @@ -128,7 +128,7 @@ private: void updateSpecies(); F32 mLastHeight; // For cheap update hack S32 mNumBlades; - + LLPointer mGrassImage; static SpeciesMap sSpeciesTable; }; #endif // LL_VO_GRASS_ diff --git a/linden/indra/newview/llvotree.cpp b/linden/indra/newview/llvotree.cpp index 208086f..ab14a3d 100644 --- a/linden/indra/newview/llvotree.cpp +++ b/linden/indra/newview/llvotree.cpp @@ -324,7 +324,7 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys, // // Load Species-Specific data // - mTreeImagep = gImageList.getImageFromFile(sSpeciesTable[mSpecies]->mTextureName); + mTreeImagep = gImageList.getImageFromFile(sSpeciesTable[mSpecies]->mTextureName, TRUE, TRUE); if (mTreeImagep) { gGL.getTexUnit(0)->bind(mTreeImagep.get()); -- cgit v1.1 From abb58b072a54c57da2c5afe8edbc7d30b7633f98 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Mon, 20 Sep 2010 11:48:27 +0200 Subject: one more poke on trees+grass + fix the windlight water --- linden/indra/newview/llviewerimagelist.cpp | 2 +- linden/indra/newview/llvograss.cpp | 9 +++++++-- linden/indra/newview/llvograss.h | 2 +- linden/indra/newview/llvotree.cpp | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llviewerimagelist.cpp b/linden/indra/newview/llviewerimagelist.cpp index 703d233..cb02b09 100644 --- a/linden/indra/newview/llviewerimagelist.cpp +++ b/linden/indra/newview/llviewerimagelist.cpp @@ -156,7 +156,7 @@ void LLViewerImageList::doPreloadImages() image->setAddressMode(LLTexUnit::TAM_WRAP); mImagePreloads.insert(image); } - image = getImage(DEFAULT_WATER_NORMAL, MIPMAP_YES, IMMEDIATE_YES); + image = getImageFromFile(DEFAULT_WATER_NORMAL.asString()+".j2c", MIPMAP_YES, IMMEDIATE_YES,0,0,DEFAULT_WATER_NORMAL); if (image) { image->setAddressMode(LLTexUnit::TAM_WRAP); diff --git a/linden/indra/newview/llvograss.cpp b/linden/indra/newview/llvograss.cpp index 35eb8fc..f738872 100644 --- a/linden/indra/newview/llvograss.cpp +++ b/linden/indra/newview/llvograss.cpp @@ -109,8 +109,8 @@ void LLVOGrass::updateSpecies() mSpecies = (*it).first; } - mGrassImage = gImageList.getImageFromFile(sSpeciesTable[mSpecies]->mTextureName, TRUE, TRUE); - setTEImage(0, mGrassImage); + LLViewerImage* grass_image = gImageList.getImageFromFile(sSpeciesTable[mSpecies]->mTextureName, TRUE, TRUE, 0, 0, sSpeciesTable[mSpecies]->mTextureID); + setTEImage(0, grass_image); } @@ -170,6 +170,11 @@ void LLVOGrass::initClass() success &= grass_def->getFastAttributeString(texture_name_string, textureName); newGrass->mTextureName = textureName; + std::string textureID; + static LLStdStringHandle texture_id = LLXmlTree::addAttributeString("texture_id"); + success &= grass_def->getFastAttributeString(texture_id, textureID); + newGrass->mTextureID = LLUUID(textureID); + static LLStdStringHandle blade_sizex_string = LLXmlTree::addAttributeString("blade_size_x"); success &= grass_def->getFastAttributeF32(blade_sizex_string, F32_val); newGrass->mBladeSizeX = F32_val; diff --git a/linden/indra/newview/llvograss.h b/linden/indra/newview/llvograss.h index b5182cc..25fa04c 100644 --- a/linden/indra/newview/llvograss.h +++ b/linden/indra/newview/llvograss.h @@ -128,7 +128,7 @@ private: void updateSpecies(); F32 mLastHeight; // For cheap update hack S32 mNumBlades; - LLPointer mGrassImage; +// LLPointer mGrassImage; static SpeciesMap sSpeciesTable; }; #endif // LL_VO_GRASS_ diff --git a/linden/indra/newview/llvotree.cpp b/linden/indra/newview/llvotree.cpp index ab14a3d..0a7cc92 100644 --- a/linden/indra/newview/llvotree.cpp +++ b/linden/indra/newview/llvotree.cpp @@ -324,7 +324,7 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys, // // Load Species-Specific data // - mTreeImagep = gImageList.getImageFromFile(sSpeciesTable[mSpecies]->mTextureName, TRUE, TRUE); + mTreeImagep = gImageList.getImageFromFile(sSpeciesTable[mSpecies]->mTextureName, TRUE, TRUE, 0, 0, sSpeciesTable[mSpecies]->mTextureID); if (mTreeImagep) { gGL.getTexUnit(0)->bind(mTreeImagep.get()); -- cgit v1.1 From f1f54a2a762e122d71d993e0f724e6d49885285f Mon Sep 17 00:00:00 2001 From: Nemurimasu Neiro Date: Tue, 24 Aug 2010 08:33:13 +0000 Subject: don't rely on indexed color extension(SNOW-220) --- linden/indra/newview/llvoavatar.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index c8b26be..36d60dd 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp @@ -7410,7 +7410,6 @@ LLGLuint LLVOAvatar::getScratchTexName( LLGLenum format, U32* texture_bytes ) { case GL_LUMINANCE: components = 1; internal_format = GL_LUMINANCE8; break; case GL_ALPHA: components = 1; internal_format = GL_ALPHA8; break; - case GL_COLOR_INDEX: components = 1; internal_format = GL_COLOR_INDEX8_EXT; break; case GL_LUMINANCE_ALPHA: components = 2; internal_format = GL_LUMINANCE8_ALPHA8; break; case GL_RGB: components = 3; internal_format = GL_RGB8; break; case GL_RGBA: components = 4; internal_format = GL_RGBA8; break; -- cgit v1.1 From 39f625963e408ec5dd394e202506700259b9b508 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 17 Sep 2010 21:19:38 -0500 Subject: Added empty indra/cmake/CMakeLists.txt to suppress a CMake 2.8 warning. "CMake Warning (dev) at CMakeLists.txt:36 (add_subdirectory): The source directory /home/jacek/imprudence/linden/indra/cmake does not contain a CMakeLists.txt file. CMake does not support this case but it used to work accidentally and is being allowed for compatibility. Policy CMP0014 is not set: Input directories must have CMakeLists.txt. Run "cmake --help-policy CMP0014" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it." --- linden/indra/cmake/CMakeLists.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 linden/indra/cmake/CMakeLists.txt (limited to 'linden/indra') diff --git a/linden/indra/cmake/CMakeLists.txt b/linden/indra/cmake/CMakeLists.txt new file mode 100644 index 0000000..e69de29 -- cgit v1.1 From d37416251a67733fdc982bf614763440a67666f9 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Thu, 23 Sep 2010 20:31:16 -0700 Subject: Fixed Windows compile bug in 721c25d8. Changed std::max to llmax since Windows apparently thought it'd be a good idea to have its own definition -_- --- linden/indra/llimagej2coj/llimagej2coj.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra') diff --git a/linden/indra/llimagej2coj/llimagej2coj.cpp b/linden/indra/llimagej2coj/llimagej2coj.cpp index 829dceb..fd92370 100644 --- a/linden/indra/llimagej2coj/llimagej2coj.cpp +++ b/linden/indra/llimagej2coj/llimagej2coj.cpp @@ -200,7 +200,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod { /* get maximum decomposition level difference, first field is from the COD header and the second is what is actually met in the codestream, NB: if everything was ok, this calculation will return what was set in the cp_reduce value! */ - decompdifference = std::max(decompdifference, cinfo.numdecompos[comp] - image->comps[comp].resno_decoded); + decompdifference = llmax(decompdifference, cinfo.numdecompos[comp] - image->comps[comp].resno_decoded); } if (decompdifference < 0) // sanity { -- cgit v1.1 From 4a625979b8ccb9ffc0c543cdf5fba37008226504 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Thu, 23 Sep 2010 16:56:54 +0200 Subject: Make chat translator ignore non-interesting translations (empty or same as original,) that may result from Google Translate's language autodetec failure. --- linden/indra/newview/llviewermessage.cpp | 45 +++++++++++++++++--------------- linden/indra/newview/llviewermessage.h | 2 +- 2 files changed, 25 insertions(+), 22 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index bfd1045..1bab3ff 100755 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -2716,43 +2716,46 @@ void process_decline_callingcard(LLMessageSystem* msg, void**) class ChatTranslationReceiver : public LLTranslate::TranslationReceiver { public : - ChatTranslationReceiver(const std::string &fromLang, const std::string &toLang, LLChat *chat, - const BOOL history) + ChatTranslationReceiver(const std::string &fromLang, const std::string &toLang, const LLChat &chat, + const std::string &orig_mesg, const BOOL history) : LLTranslate::TranslationReceiver(fromLang, toLang), m_chat(chat), + m_origMesg(orig_mesg), m_history(history) { } - static boost::intrusive_ptr build(const std::string &fromLang, const std::string &toLang, LLChat *chat, const BOOL history) + static boost::intrusive_ptr build(const std::string &fromLang, const std::string &toLang, const LLChat &chat, const std::string &orig_mesg, const BOOL history) { - return boost::intrusive_ptr(new ChatTranslationReceiver(fromLang, toLang, chat, history)); + return boost::intrusive_ptr(new ChatTranslationReceiver(fromLang, toLang, chat, orig_mesg, history)); } protected: - void handleResponse(const std::string &translation, const std::string &detectedLanguage) + void handleResponse(const std::string &translation, const std::string &detected_language) { - if (m_toLang != detectedLanguage) - m_chat->mText += " (" + translation + ")"; - - add_floater_chat(*m_chat, m_history); + // filter out non-interesting responeses + if ( !translation.empty() + && (m_toLang != detected_language) + && (LLStringUtil::compareInsensitive(translation, m_origMesg) != 0) ) + { + m_chat.mText += " (" + translation + ")"; + } - delete m_chat; + add_floater_chat(m_chat, m_history); } void handleFailure() { LLTranslate::TranslationReceiver::handleFailure(); - m_chat->mText += " (?)"; + m_chat.mText += " (?)"; - add_floater_chat(*m_chat, m_history); - - delete m_chat; + add_floater_chat(m_chat, m_history); } private: - LLChat *m_chat; + LLChat m_chat; + std::string m_origMesg; const BOOL m_history; }; @@ -2770,9 +2773,9 @@ void add_floater_chat(const LLChat &chat, const BOOL history) } } -void check_translate_chat(const std::string &mesg, LLChat &chat, const BOOL history) +void check_translate_chat(const std::string &mesg, const LLChat &chat, const BOOL history) { - const bool translate = LLUI::sConfigGroup->getBOOL("TranslateChat"); + const bool translate = gSavedSettings.getBOOL("TranslateChat"); if (translate && chat.mSourceType != CHAT_SOURCE_SYSTEM) { @@ -2780,9 +2783,8 @@ void check_translate_chat(const std::string &mesg, LLChat &chat, const BOOL hist // SVC-4879 const std::string &fromLang = ""; const std::string &toLang = LLTranslate::getTranslateLanguage(); - LLChat *newChat = new LLChat(chat); - LLHTTPClient::ResponderPtr result = ChatTranslationReceiver::build(fromLang, toLang, newChat, history); + LLHTTPClient::ResponderPtr result = ChatTranslationReceiver::build(fromLang, toLang, chat, mesg, history); LLTranslate::translateMessage(result, fromLang, toLang, mesg); } else @@ -2961,8 +2963,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) std::string prefix = mesg.substr(0, 4); if (prefix == "/me " || prefix == "/me'") { - chat.mText = from_name; - chat.mText += mesg.substr(3); + const std::string spacer = mesg.substr(3,1); + mesg = mesg.substr(4); + chat.mText = from_name + spacer + mesg; ircstyle = TRUE; } else diff --git a/linden/indra/newview/llviewermessage.h b/linden/indra/newview/llviewermessage.h index 1a6c03b..11a3554 100644 --- a/linden/indra/newview/llviewermessage.h +++ b/linden/indra/newview/llviewermessage.h @@ -76,7 +76,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data); void process_chat_from_simulator(LLMessageSystem *mesgsys, void **user_data); void add_floater_chat(const LLChat &chat, const BOOL history); -void check_translate_chat(const std::string &mesg, LLChat &chat, const BOOL history); +void check_translate_chat(const std::string &mesg, const LLChat &chat, const BOOL history); //void process_agent_to_new_region(LLMessageSystem *mesgsys, void **user_data); void send_agent_update(BOOL force_send, BOOL send_reliable = FALSE); -- cgit v1.1 From cd097fee7848f2e78c0865d0fad7d510a661aa20 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Thu, 23 Sep 2010 19:39:56 +0200 Subject: Fix LLTextEditor context menu translator returning "()" when nothing is selected. New behavior is to translate the word under the mouse if nothing is selected. --- linden/indra/llui/lltexteditor.cpp | 83 +++++++++++++++++++++++++++++++++----- linden/indra/llui/lltexteditor.h | 4 ++ 2 files changed, 77 insertions(+), 10 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index b101588..4bae155 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp @@ -105,21 +105,23 @@ bool (* LLTextEditor::mSecondlifeURLcallbackRightClick)(const std::string&) = class TextChatTranslationReceiver : public LLTranslate::TranslationReceiver { public : - TextChatTranslationReceiver(const std::string &toLang, LLTextEditor* line): LLTranslate::TranslationReceiver("", toLang), - m_line(line) + TextChatTranslationReceiver(const std::string &toLang, LLTextEditor* line, const S32 start, const S32 len): + LLTranslate::TranslationReceiver("", toLang), + m_line(line), + m_position(start), + m_origLength(len) { } - static boost::intrusive_ptr build(const std::string &toLang,LLTextEditor* line) + static boost::intrusive_ptr build(const std::string &toLang,LLTextEditor* line, const S32 start, const S32 len) { - return boost::intrusive_ptr(new TextChatTranslationReceiver(toLang,line)); + return boost::intrusive_ptr(new TextChatTranslationReceiver(toLang, line, start, len)); } protected: void handleResponse(const std::string &translation, const std::string &detectedLanguage) { - BOOL rep = gSavedSettings.getBOOL("EmeraldTranslateReplace"); - m_line->insertText((rep?"":" (") + translation +(rep?"":")"),rep); + m_line->translationReplace(translation, m_position, m_origLength); } void handleFailure() { @@ -127,6 +129,8 @@ protected: } private: LLTextEditor* m_line; + S32 m_position; + S32 m_origLength; }; /////////////////////////////////////////////////////////////////// @@ -321,6 +325,8 @@ LLTextEditor::LLTextEditor( mMouseDownY(0), mLastSelectionX(-1), mLastSelectionY(-1), + mLastContextMenuX(-1), + mLastContextMenuY(-1), mReflowNeeded(FALSE), mScrollNeeded(FALSE), mSpellCheckable(FALSE), @@ -467,17 +473,36 @@ void LLTextEditor::context_copy(void* data) LLTextEditor* line = (LLTextEditor*)data; if(line)line->copy(); } + void LLTextEditor::translateText(void * data) { SpellMenuBind* t = (SpellMenuBind*)data; LLTextEditor* line = t->origin; const std::string &toLang = t->word;//LLTranslate::getTranslateLanguage(); - LLHTTPClient::ResponderPtr result = TextChatTranslationReceiver::build(toLang,line); - S32 left_pos = llmin( line->mSelectionStart, line->mSelectionEnd ); - S32 length = abs( line->mSelectionStart - line->mSelectionEnd ); - LLTranslate::translateMessage(result,"", toLang, line->getText().substr(left_pos, length)); + bool has_text = false; + S32 start, length; + if (line->hasSelection()) + { + // translate selection + start = llmin(line->mSelectionStart, line->mSelectionEnd); + length = abs(line->mSelectionEnd - line->mSelectionStart); + has_text = length > 0; + } + else + { + // translate one word as click position + S32 at = line->getCursorPosFromLocalCoord(line->mLastContextMenuX, line->mLastContextMenuY, TRUE); + has_text = line->getWordBoundriesAt(at, &start, &length); + } + + if (has_text) + { + LLHTTPClient::ResponderPtr result = TextChatTranslationReceiver::build(toLang, line, start, length); + LLTranslate::translateMessage(result,"", toLang, line->getText().substr(start, length)); + } } + void LLTextEditor::spell_correct(void* data) { SpellMenuBind* tempBind = (SpellMenuBind*)data; @@ -947,6 +972,26 @@ S32 LLTextEditor::nextWordPos(S32 cursorPos) const return cursorPos; } +BOOL LLTextEditor::getWordBoundriesAt(const S32 at, S32* word_begin, S32* word_length) const +{ + S32 pos = at; + if (isPartOfWord(mWText[pos])) + { + while ( (pos > 0) && isPartOfWord(mWText[pos - 1]) ) + { + pos--; + } + *word_begin = pos; + while ( (pos < getLength()) && isPartOfWord(mWText[pos]) ) + { + pos++; + } + *word_length = pos - *word_begin; + return TRUE; + } + return FALSE; +} + S32 LLTextEditor::getLineStart( S32 line ) const { S32 num_lines = getLineCount(); @@ -1531,6 +1576,8 @@ BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask ) suggestionMenuItems.push_back(tempStruct); menu->append(suggMenuItem); } + mLastContextMenuX = x; + mLastContextMenuY = y; menu->buildDrawLabels(); menu->updateParent(LLMenuGL::sMenuContainer); LLMenuGL::showPopup(this, menu, x, y); @@ -2238,6 +2285,22 @@ void LLTextEditor::spellReplace(SpellMenuBind* spellData) needsReflow(); } +void LLTextEditor::translationReplace(const std::string &translation, const S32 orig_start, const S32 orig_length) +{ + //*TODO: should probably check if the content was modified since the http query + // was made, so we don't insert text in the wrong place. + BOOL replace = gSavedSettings.getBOOL("EmeraldTranslateReplace"); + LLWString wtext = utf8str_to_wstring(replace ? translation : " (" + translation + ")"); + S32 pos = replace ? orig_start : orig_start + orig_length; + if (replace) + { + remove(orig_start, orig_length, FALSE); + } + insert(pos, wtext, FALSE); + setCursorPos(pos + wtext.length()); + needsReflow(); +} + // paste from clipboard void LLTextEditor::paste() { diff --git a/linden/indra/llui/lltexteditor.h b/linden/indra/llui/lltexteditor.h index 57a6bbd..f6669c4 100644 --- a/linden/indra/llui/lltexteditor.h +++ b/linden/indra/llui/lltexteditor.h @@ -136,6 +136,7 @@ public: virtual BOOL canPaste() const; virtual void spellReplace(SpellMenuBind* spellData); + virtual void translationReplace(const std::string &translation, const S32 orig_start, const S32 orig_length); virtual void updatePrimary(); virtual void copyPrimary(); @@ -352,6 +353,7 @@ public: S32 prevWordPos(S32 cursorPos) const; S32 nextWordPos(S32 cursorPos) const; + BOOL getWordBoundriesAt(const S32 at, S32* word_begin, S32* word_length) const; S32 getLineCount() const { return mLineStartList.size(); } S32 getLineStart( S32 line ) const; @@ -568,6 +570,8 @@ private: //to keep track of what we have to remove before showing menu std::vector suggestionMenuItems; + S32 mLastContextMenuX; + S32 mLastContextMenuY; line_list_t mLineStartList; BOOL mReflowNeeded; -- cgit v1.1 From f6f5603b946a56059987071b7151a1c2e64c45d5 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Fri, 24 Sep 2010 02:29:58 +0200 Subject: Fix LLLineEditor context menu translator returning "()" when nothing is selected. New behavior is to translate the word under the mouse if nothing is selected. --- linden/indra/llui/lllineeditor.cpp | 90 +++++++++++++++++++++++++++++++++----- linden/indra/llui/lllineeditor.h | 3 ++ 2 files changed, 81 insertions(+), 12 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp index 66ef4c6..27a1d50 100644 --- a/linden/indra/llui/lllineeditor.cpp +++ b/linden/indra/llui/lllineeditor.cpp @@ -96,23 +96,23 @@ static LLRegisterWidget r1("line_editor"); class LineChatTranslationReceiver : public LLTranslate::TranslationReceiver { public : - LineChatTranslationReceiver(const std::string &toLang, LLLineEditor* line): LLTranslate::TranslationReceiver("", toLang), - m_line(line) + LineChatTranslationReceiver(const std::string &toLang, LLLineEditor* line, const S32 start, const S32 len): + LLTranslate::TranslationReceiver("", toLang), + m_line(line), + m_position(start), + m_origLength(len) { } - static boost::intrusive_ptr build(const std::string &toLang,LLLineEditor* line) + static boost::intrusive_ptr build(const std::string &toLang,LLLineEditor* line, const S32 start, const S32 len) { - return boost::intrusive_ptr(new LineChatTranslationReceiver(toLang,line)); + return boost::intrusive_ptr(new LineChatTranslationReceiver(toLang, line, start, len)); } protected: void handleResponse(const std::string &translation, const std::string &detectedLanguage) { - static BOOL* rep = rebind_llcontrol("EmeraldTranslateReplace", &gSavedSettings, true); - if(*rep) - m_line->deleteSelection(); - m_line->insert(((*rep)?"":" (") + translation + ((*rep)?"":")"),m_line->getCursor()); + m_line->translationReplace(translation, m_position, m_origLength); } void handleFailure() { @@ -120,6 +120,8 @@ protected: } private: LLLineEditor* m_line; + S32 m_position; + S32 m_origLength; }; LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect, @@ -151,6 +153,7 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect, mLastSelectionY(-1), mLastSelectionStart(-1), mLastSelectionEnd(-1), + mLastContextMenuX(-1), mPrevalidateFunc( prevalidate_func ), mCursorColor( LLUI::sColorsGroup->getColor( "TextCursorColor" ) ), mFgColor( LLUI::sColorsGroup->getColor( "TextFgColor" ) ), @@ -539,16 +542,36 @@ void LLLineEditor::spell_correct(void* data) } } + void LLLineEditor::translateText(void * data) { SpellMenuBind* t = (SpellMenuBind*)data; LLLineEditor* line = t->origin; const std::string &toLang = t->word;//LLTranslate::getTranslateLanguage(); - LLHTTPClient::ResponderPtr result = LineChatTranslationReceiver::build(toLang,line); - S32 left_pos = llmin( line->mSelectionStart, line->mSelectionEnd ); - S32 length = abs( line->mSelectionStart - line->mSelectionEnd ); - LLTranslate::translateMessage(result,"", toLang, line->mText.getString().substr(left_pos, length)); + + bool has_text = false; + S32 start, length; + if (line->hasSelection()) + { + // translate selection + start = llmin(line->mSelectionStart, line->mSelectionEnd); + length = abs(line->mSelectionEnd - line->mSelectionStart); + has_text = length > 0; + } + else + { + // translate one word at click position + S32 at = line->calculateCursorFromMouse(line->mLastContextMenuX); + has_text = line->getWordBoundriesAt(at, &start, &length); + } + + if (has_text) + { + LLHTTPClient::ResponderPtr result = LineChatTranslationReceiver::build(toLang, line, start, length); + LLTranslate::translateMessage(result,"", toLang, line->getText().substr(start, length)); + } } + void LLLineEditor::spell_show(void * data) { SpellMenuBind* tempBind = (SpellMenuBind*)data; @@ -836,6 +859,7 @@ BOOL LLLineEditor::handleRightMouseDown( S32 x, S32 y, MASK mask ) menu->append(suggMenuItem); } + mLastContextMenuX = x; menu->buildDrawLabels(); menu->updateParent(LLMenuGL::sMenuContainer); LLMenuGL::showPopup(this, menu, x, y); @@ -1152,6 +1176,26 @@ S32 LLLineEditor::nextWordPos(S32 cursorPos) const return cursorPos; } +BOOL LLLineEditor::getWordBoundriesAt(const S32 at, S32* word_begin, S32* word_length) const +{ + const LLWString& wtext = mText.getWString(); + S32 pos = at; + if (LLTextEditor::isPartOfWord(wtext[pos])) + { + while ( (pos > 0) && LLTextEditor::isPartOfWord(wtext[pos - 1]) ) + { + pos--; + } + *word_begin = pos; + while ( (pos < getLength()) && LLTextEditor::isPartOfWord(wtext[pos]) ) + { + pos++; + } + *word_length = pos - *word_begin; + return TRUE; + } + return FALSE; +} BOOL LLLineEditor::handleSelectionKey(KEY key, MASK mask) { @@ -1315,6 +1359,28 @@ void LLLineEditor::spellReplace(SpellMenuBind* spellData) } + +void LLLineEditor::translationReplace(const std::string &translation, const S32 orig_start, const S32 orig_length) +{ + //*TODO: should probably check if the content was modified since the http query + // was made, so we don't insert text in the wrong place. + BOOL replace = gSavedSettings.getBOOL("EmeraldTranslateReplace"); + std::string text = replace ? translation : " (" + translation + ")"; + S32 pos = replace ? orig_start : orig_start + orig_length; + if (replace) + { + mText.erase(orig_start, orig_length); + } + insert(text, pos); + + if (hasSelection()) + { + mSelectionStart = pos; + mSelectionEnd = pos + text.length(); + } + setCursor(pos + text.length()); +} + void LLLineEditor::insert(std::string what, S32 wher) { LLLineEditorRollback rollback(this); diff --git a/linden/indra/llui/lllineeditor.h b/linden/indra/llui/lllineeditor.h index 147b232..af37f62 100644 --- a/linden/indra/llui/lllineeditor.h +++ b/linden/indra/llui/lllineeditor.h @@ -107,6 +107,7 @@ public: }; virtual void spellReplace(SpellMenuBind* spellData); + virtual void translationReplace(const std::string &translation, const S32 orig_start, const S32 orig_length); virtual void insert(std::string what,S32 wher); // LLEditMenuHandler overrides @@ -215,6 +216,7 @@ public: // get the cursor position of the beginning/end of the prev/next word in the text S32 prevWordPos(S32 cursorPos) const; S32 nextWordPos(S32 cursorPos) const; + BOOL getWordBoundriesAt(const S32 at, S32* word_begin, S32* word_length) const; BOOL hasSelection() const { return (mSelectionStart != mSelectionEnd); } void startSelection(); @@ -298,6 +300,7 @@ protected: LLFrameTimer mSpellTimer; //to keep track of what we have to remove before showing menu std::vector suggestionMenuItems; + S32 mLastContextMenuX; // line history support: BOOL mHaveHistory; // flag for enabled line history -- cgit v1.1 From 6cd906519bf090dff532b3cf4d206fd1a25c6504 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Sat, 25 Sep 2010 01:14:51 +0200 Subject: More LLLineEditor context translator bugfixes: - Use LLWString when doing size calculations (potential crashes and misplaced text) - Weird selection range after translating selected text. --- linden/indra/llui/lllineeditor.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp index 27a1d50..5f2a314 100644 --- a/linden/indra/llui/lllineeditor.cpp +++ b/linden/indra/llui/lllineeditor.cpp @@ -567,8 +567,9 @@ void LLLineEditor::translateText(void * data) if (has_text) { + std::string to_translate = wstring_to_utf8str(line->getWText().substr(start, length)); LLHTTPClient::ResponderPtr result = LineChatTranslationReceiver::build(toLang, line, start, length); - LLTranslate::translateMessage(result,"", toLang, line->getText().substr(start, length)); + LLTranslate::translateMessage(result,"", toLang, to_translate); } } @@ -1133,13 +1134,11 @@ void LLLineEditor::setSelection(S32 start, S32 end) { S32 len = mText.length(); - mIsSelecting = TRUE; - // JC, yes, this seems odd, but I think you have to presume a // selection dragged from the end towards the start. mSelectionStart = llclamp(end, 0, len); mSelectionEnd = llclamp(start, 0, len); - setCursor(start); + setCursor(end); } void LLLineEditor::setDrawAsterixes(BOOL b) @@ -1187,7 +1186,7 @@ BOOL LLLineEditor::getWordBoundriesAt(const S32 at, S32* word_begin, S32* word_l pos--; } *word_begin = pos; - while ( (pos < getLength()) && LLTextEditor::isPartOfWord(wtext[pos]) ) + while ( (pos < wtext.length()) && LLTextEditor::isPartOfWord(wtext[pos]) ) { pos++; } @@ -1373,12 +1372,12 @@ void LLLineEditor::translationReplace(const std::string &translation, const S32 } insert(text, pos); + S32 text_wlen = utf8str_to_wstring(text).length(); if (hasSelection()) { - mSelectionStart = pos; - mSelectionEnd = pos + text.length(); + setSelection(pos, pos + text_wlen); } - setCursor(pos + text.length()); + setCursor(pos + text_wlen); } void LLLineEditor::insert(std::string what, S32 wher) -- cgit v1.1 From 8f30fb06d1361d7d74f018d5bbaf5e82b846d8a4 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Sat, 25 Sep 2010 04:04:26 +0200 Subject: LLLineEditor context translator: re-select text properly. --- linden/indra/llui/lllineeditor.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp index 5f2a314..503a1bd 100644 --- a/linden/indra/llui/lllineeditor.cpp +++ b/linden/indra/llui/lllineeditor.cpp @@ -1134,10 +1134,8 @@ void LLLineEditor::setSelection(S32 start, S32 end) { S32 len = mText.length(); - // JC, yes, this seems odd, but I think you have to presume a - // selection dragged from the end towards the start. - mSelectionStart = llclamp(end, 0, len); - mSelectionEnd = llclamp(start, 0, len); + mSelectionStart = llclamp(start, 0, len); + mSelectionEnd = llclamp(end, 0, len); setCursor(end); } -- cgit v1.1 From f5006e8a2f34afa390f0bbcf0f6af15218cf4105 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Sat, 25 Sep 2010 12:58:56 +0200 Subject: LLLineEditor context translator: - Added a xui attribute "allow_translate", default to off (not enabled in any xml file yet.) - Only show translate menu if clicked on a word, or something is selected. --- linden/indra/llui/lllineeditor.cpp | 35 ++++++++++++++++------------------- linden/indra/llui/lllineeditor.h | 2 ++ 2 files changed, 18 insertions(+), 19 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp index 503a1bd..05966d6 100644 --- a/linden/indra/llui/lllineeditor.cpp +++ b/linden/indra/llui/lllineeditor.cpp @@ -175,7 +175,8 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect, mImage( sImage ), mReplaceNewlinesWithSpaces( TRUE ), mSpellCheckable( FALSE ), - mShowMisspellings(FALSE) + mShowMisspellings(FALSE), + mAllowTranslate(FALSE) { llassert( max_length_bytes > 0 ); @@ -762,7 +763,8 @@ BOOL LLLineEditor::handleRightMouseDown( S32 x, S32 y, MASK mask ) //setCursorAtLocalPos( x); S32 wordStart = 0; - S32 wordEnd = calculateCursorFromMouse(x); + S32 wordEnd = 0; + S32 pos = calculateCursorFromMouse(x); LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get(); if (menu) @@ -785,29 +787,19 @@ BOOL LLLineEditor::handleRightMouseDown( S32 x, S32 y, MASK mask ) } suggestionMenuItems.clear(); - menu->setItemVisible("Translate To", !mReadOnly); - menu->setItemVisible("Transep", !mReadOnly); + bool is_word_part = getWordBoundriesAt(pos, &wordStart, &wordEnd); + // allow_translate="true" in xui + bool can_translate = mAllowTranslate && !mReadOnly && (is_word_part || hasSelection()); + menu->setItemVisible("Translate To", can_translate); + menu->setItemVisible("Transep", can_translate); // spell_check="true" in xui if (!mReadOnly && mSpellCheckable) { - const LLWString& text = mText.getWString(); - // search for word matches - if (LLTextEditor::isPartOfWord(text[wordEnd])) + if (is_word_part) { - // Select word the cursor is over - while ((wordEnd > 0) && LLTextEditor::isPartOfWord(text[wordEnd-1])) - { - wordEnd--; - } - wordStart = wordEnd; - //startSelection(); - - while ((wordEnd < (S32)text.length()) && LLTextEditor::isPartOfWord( text[wordEnd] ) ) - { - wordEnd++; - } + const LLWString& text = mText.getWString(); std::string selectedWord(std::string(text.begin(), text.end()).substr(wordStart,wordEnd-wordStart)); if (!glggHunSpell->isSpelledRight(selectedWord)) @@ -2893,6 +2885,11 @@ LLView* LLLineEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory { line_editor->setSpellCheckable(spell_checking); } + BOOL allow_translate = FALSE; + if (node->getAttributeBOOL("allow_translate", allow_translate)) + { + line_editor->setAllowTranslate(allow_translate); + } line_editor->setColorParameters(node); diff --git a/linden/indra/llui/lllineeditor.h b/linden/indra/llui/lllineeditor.h index af37f62..0ad415a 100644 --- a/linden/indra/llui/lllineeditor.h +++ b/linden/indra/llui/lllineeditor.h @@ -200,6 +200,7 @@ public: void setReadOnlyBgColor( const LLColor4& c ) { mReadOnlyBgColor = c; } void setFocusBgColor(const LLColor4& c) { mFocusBgColor = c; } void setSpellCheckable(BOOL b) { mSpellCheckable = b; } + void setAllowTranslate(BOOL b) { mAllowTranslate = b; } const LLColor4& getFgColor() const { return mFgColor; } const LLColor4& getReadOnlyFgColor() const { return mReadOnlyFgColor; } @@ -301,6 +302,7 @@ protected: //to keep track of what we have to remove before showing menu std::vector suggestionMenuItems; S32 mLastContextMenuX; + BOOL mAllowTranslate; // set in xui as "allow_translate". // line history support: BOOL mHaveHistory; // flag for enabled line history -- cgit v1.1 From 81a3df503aece6b46e1efbdb7e274253cb898660 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Sat, 25 Sep 2010 15:00:50 +0200 Subject: LLTextEditor context translator: - Added a xui attribute "allow_translate", default to off (not enabled in any xml file yet.) - Only show translate menu if clicked on a word, or something is selected. --- linden/indra/llui/lltexteditor.cpp | 34 +++++++++++++++------------------- linden/indra/llui/lltexteditor.h | 1 + 2 files changed, 16 insertions(+), 19 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 4bae155..adf0260 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp @@ -330,7 +330,8 @@ LLTextEditor::LLTextEditor( mReflowNeeded(FALSE), mScrollNeeded(FALSE), mSpellCheckable(FALSE), - mShowMisspellings(FALSE) + mShowMisspellings(FALSE), + mAllowTranslate(FALSE) { mSourceID.generate(); @@ -1484,7 +1485,8 @@ BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask ) //setCursorAtLocalPos( x, y, TRUE ); S32 wordStart = 0; - S32 wordEnd = getCursorPosFromLocalCoord(x,y,TRUE); + S32 wordEnd = 0; + S32 pos = getCursorPosFromLocalCoord(x,y,TRUE); LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get(); if (menu) @@ -1503,29 +1505,21 @@ BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask ) } suggestionMenuItems.clear(); - menu->setItemVisible("Translate To", !mReadOnly); - menu->setItemVisible("Transep", !mReadOnly); + bool is_word_part = getWordBoundriesAt(pos, &wordStart, &wordEnd); + + // allow_translate="true" in xui + bool can_translate = mAllowTranslate && !mReadOnly && (is_word_part || hasSelection()); + menu->setItemVisible("Translate To", can_translate); + menu->setItemVisible("Transep", can_translate); // spell_check="true" in xui if (!mReadOnly && mSpellCheckable) { - const LLWString &text = mWText; - - if (isPartOfWord(text[wordEnd]) && !mReadOnly) + if (is_word_part) { - // Select word the cursor is over - while ((wordEnd > 0) && isPartOfWord(text[wordEnd-1])) - { - wordEnd--; - } - wordStart = wordEnd; - //startSelection(); - - while ((wordEnd < (S32)text.length()) && isPartOfWord( text[wordEnd] ) ) - { - wordEnd++; - } + const LLWString &text = mWText; std::string selectedWord(std::string(text.begin(), text.end()).substr(wordStart,wordEnd-wordStart)); + if (!glggHunSpell->isSpelledRight(selectedWord)) { //misspelled word here, and you have just right clicked on it! @@ -4964,6 +4958,8 @@ void LLTextEditor::setTextEditorParameters(LLXMLNodePtr node) node->getAttributeBOOL("spell_check", mSpellCheckable); + node->getAttributeBOOL("allow_translate", mAllowTranslate); + LLColor4 color; if (LLUICtrlFactory::getAttributeColor(node,"cursor_color", color)) { diff --git a/linden/indra/llui/lltexteditor.h b/linden/indra/llui/lltexteditor.h index f6669c4..3269e17 100644 --- a/linden/indra/llui/lltexteditor.h +++ b/linden/indra/llui/lltexteditor.h @@ -530,6 +530,7 @@ private: std::vector misspellLocations; // where all the mispelled words are BOOL mSpellCheckable; // set in xui as "spell_check". Default value for a field BOOL mShowMisspellings; // show misspellings as highlighted (initialized in the ctor) + BOOL mAllowTranslate; // set in xui as "allow_translate". S32 mMaxTextByteLength; // Maximum length mText is allowed to be in bytes -- cgit v1.1 From 2760d30363716b8d469134d197a9874eccea6aa3 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Sat, 25 Sep 2010 16:14:11 +0200 Subject: LLTextEditor context translator: set selection after translation. --- linden/indra/llui/lltexteditor.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index adf0260..d59eed6 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp @@ -499,8 +499,9 @@ void LLTextEditor::translateText(void * data) if (has_text) { + const std::string to_translate = wstring_to_utf8str(line->getWText().substr(start, length)); LLHTTPClient::ResponderPtr result = TextChatTranslationReceiver::build(toLang, line, start, length); - LLTranslate::translateMessage(result,"", toLang, line->getText().substr(start, length)); + LLTranslate::translateMessage(result,"", toLang, to_translate); } } @@ -2290,8 +2291,13 @@ void LLTextEditor::translationReplace(const std::string &translation, const S32 { remove(orig_start, orig_length, FALSE); } - insert(pos, wtext, FALSE); - setCursorPos(pos + wtext.length()); + S32 inserted = insert(pos, wtext, FALSE); + if (hasSelection()) + { + mSelectionStart = llclamp(pos, 0, getLength()); + mSelectionEnd = llclamp(pos + inserted, mSelectionStart, getLength()); + } + setCursorPos(pos + inserted); needsReflow(); } -- cgit v1.1 From 702b44426e036495c5568e7422e8cd77a46f1966 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Sat, 25 Sep 2010 16:18:20 +0200 Subject: Context translator: default to enabled. Set the default of the xui attribute "allow_translate" to true, and add allow_translate="false" to panel_login.xml. This probably needs to be disabled in other places as well. --- linden/indra/llui/lllineeditor.cpp | 4 ++-- linden/indra/llui/lltexteditor.cpp | 2 +- linden/indra/newview/skins/default/xui/en-us/panel_login.xml | 9 ++++++--- 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp index 05966d6..8d88ce9 100644 --- a/linden/indra/llui/lllineeditor.cpp +++ b/linden/indra/llui/lllineeditor.cpp @@ -176,7 +176,7 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect, mReplaceNewlinesWithSpaces( TRUE ), mSpellCheckable( FALSE ), mShowMisspellings(FALSE), - mAllowTranslate(FALSE) + mAllowTranslate(TRUE) { llassert( max_length_bytes > 0 ); @@ -2885,7 +2885,7 @@ LLView* LLLineEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory { line_editor->setSpellCheckable(spell_checking); } - BOOL allow_translate = FALSE; + BOOL allow_translate = TRUE; if (node->getAttributeBOOL("allow_translate", allow_translate)) { line_editor->setAllowTranslate(allow_translate); diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index d59eed6..5ee94c8 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp @@ -331,7 +331,7 @@ LLTextEditor::LLTextEditor( mScrollNeeded(FALSE), mSpellCheckable(FALSE), mShowMisspellings(FALSE), - mAllowTranslate(FALSE) + mAllowTranslate(TRUE) { mSourceID.generate(); diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_login.xml b/linden/indra/newview/skins/default/xui/en-us/panel_login.xml index dda5e4d..96f3f77 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_login.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_login.xml @@ -58,7 +58,8 @@ bevel_style="in" border_style="line" border_thickness="1" max_length="31" mouse_opaque="true" handle_edit_keys_directly="true" - select_all_on_focus_received="true" /> + select_all_on_focus_received="true" + allow_translate="false" /> @@ -77,7 +78,8 @@ bevel_style="in" border_style="line" border_thickness="1" max_length="31" mouse_opaque="true" handle_edit_keys_directly="true" - select_all_on_focus_received="true" /> + select_all_on_focus_received="true" + allow_translate="false" /> @@ -96,7 +98,8 @@ bevel_style="in" border_style="line" border_thickness="1" max_length="16" mouse_opaque="true" handle_edit_keys_directly="true" - select_all_on_focus_received="true" /> + select_all_on_focus_received="true" + allow_translate="false" /> append(new LLMenuItemCallGL("Paste", context_paste, NULL, this)); menu->append(new LLMenuItemCallGL("Delete", context_delete, NULL, this)); menu->append(new LLMenuItemCallGL("Select All", context_selectall, NULL, this)); - menu->appendSeparator("transep"); + menu->appendSeparator("Transep"); LLMenuGL* translatemenu = new LLMenuGL("Translate To"); translatemenu->setCanTearOff(FALSE); SpellMenuBind* t=new SpellMenuBind;t->origin=this;t->word="en"; -- cgit v1.1 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/indra') 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/indra') 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/indra') 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/indra') 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 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/indra') 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 d2819a498a3167af490de549a3d22371ece3c2a3 Mon Sep 17 00:00:00 2001 From: elektrahesse Date: Sat, 25 Sep 2010 19:24:23 +0200 Subject: Changes the search system, so it matches the keyword against name or surname initials. --- linden/indra/newview/llfloaterfriends.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llfloaterfriends.cpp b/linden/indra/newview/llfloaterfriends.cpp index e2d3f7c..c33deae 100644 --- a/linden/indra/newview/llfloaterfriends.cpp +++ b/linden/indra/newview/llfloaterfriends.cpp @@ -464,12 +464,13 @@ void LLPanelFriends::refreshNames(U32 changed_mask, const std::string& search_st for (LLAvatarTracker::buddy_map_t::reverse_iterator bIt = all_buddies.rbegin(); bIt != all_buddies.rend(); ++bIt) { - llinfos << (*bIt).first << llendl; if (gCacheName->getName((*bIt).first, firstname, lastname)) { - std::string test_name(firstname + " " + lastname); - LLStringUtil::toLower(test_name); - if (test_name.find(filter) != std::string::npos) + std::string l_name(firstname); + LLStringUtil::toLower(l_name); + std::string l_sname(lastname); + LLStringUtil::toLower(l_sname); + if (l_name.find(filter) == 0 || l_sname.find(filter) == 0) { temp_buddies.insert(temp_buddies.begin(), std::pair((*bIt).first, (*bIt).second)); } -- 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/indra') 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 @@ - - - - - - - - -