From 86446c7b55c4265b3dd90919e4d1cd4a4d30ea6a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 24 Sep 2024 18:31:48 +0300 Subject: viewer#2648 Fix issues with day offset value --- indra/newview/llenvironment.cpp | 1 + indra/newview/llpanelenvironment.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 05bd704556..722c565300 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -2087,6 +2087,7 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInf body[KEY_ENVIRONMENT][KEY_DAYLENGTH] = updates->mDayLength; } + // server only allows positive values if (updates->mDayOffset > 0) { body[KEY_ENVIRONMENT][KEY_DAYOFFSET] = updates->mDayOffset; diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index 423ca376d1..7dd9f6e86e 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -287,7 +287,7 @@ void LLPanelEnvironmentInfo::refresh() F32Hours daylength(mCurrentEnvironment->mDayLength); F32Hours dayoffset(mCurrentEnvironment->mDayOffset); - if (dayoffset.value() > 12.0f) + while (dayoffset.value() >= daylength.value()) dayoffset -= daylength; mSliderDayLength->setValue(daylength.value()); @@ -734,8 +734,8 @@ void LLPanelEnvironmentInfo::onSldDayOffsetChanged(F32 value) { F32Hours dayoffset(value); - if (dayoffset.value() <= 0.0f) - // if day cycle is 5 hours long, we want -1h offset to result in 4h + // server only allows positive values + while (dayoffset.value() <= 0.0f) dayoffset += mCurrentEnvironment->mDayLength; mCurrentEnvironment->mDayOffset = dayoffset; -- cgit v1.2.3 From a2e9a0caf32003253766efe528329fdd11f28b0b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 24 Sep 2024 22:20:35 +0300 Subject: viewer-private#291 Object floating text does not update without moving camera --- indra/newview/llhudtext.cpp | 16 +++++++++++++++- indra/newview/llhudtext.h | 4 +++- 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 92f09c34a0..818474a0cb 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -185,6 +185,15 @@ void LLHUDText::renderText() LLVector3 render_position = mPositionAgent + (x_pixel_vec * screen_offset.mV[VX]) + (y_pixel_vec * screen_offset.mV[VY]); + bool reset_buffers = false; + const F32 treshold = 0.000001f; + if (abs(mLastRenderPosition.mV[VX] - render_position.mV[VX]) > treshold + || abs(mLastRenderPosition.mV[VY] - render_position.mV[VY]) > treshold + || abs(mLastRenderPosition.mV[VZ] - render_position.mV[VZ]) > treshold) + { + reset_buffers = true; + mLastRenderPosition = render_position; + } F32 y_offset = (F32)mOffsetY; @@ -208,6 +217,11 @@ void LLHUDText::renderText() for (std::vector::iterator segment_iter = mTextSegments.begin() + start_segment; segment_iter != mTextSegments.end(); ++segment_iter ) { + if (reset_buffers) + { + segment_iter->mFontBufferText.reset(); + } + const LLFontGL* fontp = segment_iter->mFont; y_offset -= fontp->getLineHeight() - 1; // correction factor to match legacy font metrics @@ -231,7 +245,7 @@ void LLHUDText::renderText() } text_color.mV[VALPHA] *= alpha_factor; - hud_render_text(segment_iter->getText(), render_position, &mFontBuffer, *fontp, style, shadow, x_offset, y_offset, text_color, mOnHUDAttachment); + hud_render_text(segment_iter->getText(), render_position, &segment_iter->mFontBufferText, *fontp, style, shadow, x_offset, y_offset, text_color, mOnHUDAttachment); } } /// Reset the default color to white. The renderer expects this to be the default. diff --git a/indra/newview/llhudtext.h b/indra/newview/llhudtext.h index 224677736c..4c850e2d91 100644 --- a/indra/newview/llhudtext.h +++ b/indra/newview/llhudtext.h @@ -67,6 +67,8 @@ protected: LLColor4 mColor; LLFontGL::StyleFlags mStyle; const LLFontGL* mFont; + LLFontVertexBuffer mFontBuffer; + LLFontVertexBuffer mFontBufferText; private: LLWString mText; std::map mFontWidthMap; @@ -152,6 +154,7 @@ private: const LLFontGL* mBoldFontp; LLRectf mSoftScreenRect; LLVector3 mPositionAgent; + LLVector3 mLastRenderPosition; LLVector2 mPositionOffset; LLVector2 mTargetPositionOffset; F32 mMass; @@ -162,7 +165,6 @@ private: ETextAlignment mTextAlignment; EVertAlignment mVertAlignment; bool mHidden; - LLFontVertexBuffer mFontBuffer; static bool sDisplayText ; static std::set > sTextObjects; -- cgit v1.2.3 From cd8b0a4fc9062e2ea03c41c7c83dbbfde0755d8c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 24 Sep 2024 20:15:50 +0300 Subject: Revert "viewer#2413 Remove obsolete alert about expiring voice morphs" This reverts commit 5c16ae13758bdfe8fe1f13d5f67eabbb6eaa30a1. Fix is correct, but should wait untill server sided fix gets deployed. --- indra/newview/app_settings/settings.xml | 11 +++++++ indra/newview/llvoicevivox.cpp | 34 ++++++++++++++++++++++ indra/newview/llvoicevivox.h | 1 + .../newview/skins/default/xui/da/notifications.xml | 4 +++ .../newview/skins/default/xui/de/notifications.xml | 4 +++ .../newview/skins/default/xui/en/notifications.xml | 15 ++++++++++ .../newview/skins/default/xui/es/notifications.xml | 4 +++ .../newview/skins/default/xui/fr/notifications.xml | 4 +++ .../newview/skins/default/xui/it/notifications.xml | 4 +++ .../newview/skins/default/xui/ja/notifications.xml | 11 +++++++ .../newview/skins/default/xui/pl/notifications.xml | 5 ++++ .../newview/skins/default/xui/pt/notifications.xml | 4 +++ .../newview/skins/default/xui/ru/notifications.xml | 6 ++++ .../newview/skins/default/xui/tr/notifications.xml | 6 ++++ .../newview/skins/default/xui/zh/notifications.xml | 6 ++++ 15 files changed, 119 insertions(+) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 82eb98b06b..3163f5a849 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13202,6 +13202,17 @@ Value 0 + VoiceEffectExpiryWarningTime + + Comment + How much notice to give of Voice Morph subscriptions expiry, in seconds. + Persist + 1 + Type + S32 + Value + 259200 + VoiceMorphingEnabled Comment diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 1e934ade59..e25f914c47 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -6458,6 +6458,7 @@ LLVivoxVoiceClient::voiceFontEntry::voiceFontEntry(LLUUID& id) : mIsNew(false) { mExpiryTimer.stop(); + mExpiryWarningTimer.stop(); } LLVivoxVoiceClient::voiceFontEntry::~voiceFontEntry() @@ -6568,6 +6569,20 @@ void LLVivoxVoiceClient::addVoiceFont(const S32 font_index, font->mExpiryTimer.start(); font->mExpiryTimer.setExpiryAt(expiration_date.secondsSinceEpoch() - VOICE_FONT_EXPIRY_INTERVAL); + // Set the warning timer to some interval before actual expiry. + S32 warning_time = gSavedSettings.getS32("VoiceEffectExpiryWarningTime"); + if (warning_time != 0) + { + font->mExpiryWarningTimer.start(); + F64 expiry_time = (expiration_date.secondsSinceEpoch() - (F64)warning_time); + font->mExpiryWarningTimer.setExpiryAt(expiry_time - VOICE_FONT_EXPIRY_INTERVAL); + } + else + { + // Disable the warning timer. + font->mExpiryWarningTimer.stop(); + } + // Only flag new session fonts after the first time we have fetched the list. if (mVoiceFontsReceived) { @@ -6609,6 +6624,7 @@ void LLVivoxVoiceClient::expireVoiceFonts() // than checking each font individually. bool have_expired = false; + bool will_expire = false; bool expired_in_use = false; LLUUID current_effect = LLVoiceClient::instance().getVoiceEffectDefault(); @@ -6618,6 +6634,7 @@ void LLVivoxVoiceClient::expireVoiceFonts() { voiceFontEntry* voice_font = iter->second; LLFrameTimer& expiry_timer = voice_font->mExpiryTimer; + LLFrameTimer& warning_timer = voice_font->mExpiryWarningTimer; // Check for expired voice fonts if (expiry_timer.getStarted() && expiry_timer.hasExpired()) @@ -6634,6 +6651,14 @@ void LLVivoxVoiceClient::expireVoiceFonts() deleteVoiceFont(voice_font->mID); have_expired = true; } + + // Check for voice fonts that will expire in less that the warning time + if (warning_timer.getStarted() && warning_timer.hasExpired()) + { + LL_DEBUGS("VoiceFont") << "Voice Font " << voice_font->mName << " will expire soon." << LL_ENDL; + will_expire = true; + warning_timer.stop(); + } } LLSD args; @@ -6655,6 +6680,15 @@ void LLVivoxVoiceClient::expireVoiceFonts() // Refresh voice font lists in the UI. notifyVoiceFontObservers(); } + + // Give a warning notification if any voice fonts are due to expire. + if (will_expire) + { + S32Seconds seconds(gSavedSettings.getS32("VoiceEffectExpiryWarningTime")); + args["INTERVAL"] = llformat("%d", LLUnit(seconds).value()); + + LLNotificationsUtil::add("VoiceEffectsWillExpire", args); + } } void LLVivoxVoiceClient::deleteVoiceFont(const LLUUID& id) diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 3167705528..7862e492b2 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -880,6 +880,7 @@ private: bool mIsNew; LLFrameTimer mExpiryTimer; + LLFrameTimer mExpiryWarningTimer; }; bool mVoiceFontsReceived; diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml index 4a4b7269dc..283a7b2a43 100644 --- a/indra/newview/skins/default/xui/da/notifications.xml +++ b/indra/newview/skins/default/xui/da/notifications.xml @@ -1572,6 +1572,10 @@ Klik på Acceptér for at deltage eller Afvis for at afvise invitationen. Klik p Den aktive stemme "morph" er udløbet og din normale stemme opsætning er genaktiveret. +[[URL] Click here] for at forny dit abbonnement. + + + En eller flere af dine stemme "morphs" vil udløbe om mindre end [INTERVAL] dage. [[URL] Click here] for at forny dit abbonnement. diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 76bebedeec..6ad71e0ad1 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -2465,6 +2465,10 @@ Wenn Sie Premium-Mitglied sind, [[PREMIUM_URL] klicken Sie hier], um Ihren Voice Das aktive Voice-Morph-Abo ist abgelaufen. Ihre normalen Voice-Einstellungen werden angewendet. [[URL] Klicken Sie hier], um Ihr Abo zu erneuern. +Wenn Sie Premium-Mitglied sind, [[PREMIUM_URL] klicken Sie hier], um Ihren Voice-Morphing-Vorteil zu nutzen. + Ein oder mehrere Ihrer Voice-Morph-Abos laufen in weniger als [INTERVAL] Tagen ab. +[[URL] Klicken Sie hier], um Ihr Abo zu erneuern. + Wenn Sie Premium-Mitglied sind, [[PREMIUM_URL] klicken Sie hier], um Ihren Voice-Morphing-Vorteil zu nutzen. Neue Voice-Morph-Effekte sind erhältlich! Nur Mitglieder einer bestimmten Gruppe dürfen diesen Bereich betreten. diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 848d9aca7c..5ce73b2cfa 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -8858,6 +8858,21 @@ If you are a Premium Member, [[PREMIUM_URL] click here] to receive your voice mo voice + + +One or more of your Voice Morphs will expire in less than [INTERVAL] days. +[[URL] Click here] to renew your subscription. + +If you are a Premium Member, [[PREMIUM_URL] click here] to receive your voice morphing perk. + fail + voice + + La transformación de voz activa ha caducado y se ha aplicado tu configuración de voz normal. [[URL] Pulsa aquí] para renovar la suscripción. +Si eres un miembro Premium [[PREMIUM_URL] pulsa aquí] para recibir tu beneficio de transformación de voz. + Una o más de tus transformaciones de voz caducarán en menos de [INTERVAL] días. +[[URL] Pulsa aquí] para renovar la suscripción + Si eres un miembro Premium [[PREMIUM_URL] pulsa aquí] para recibir tu beneficio de transformación de voz. Están disponibles nuevas transformaciones de voz. Sólo los miembros de un grupo determinado pueden visitar esta zona. diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index 17cf18633f..587c88faad 100644 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -2451,6 +2451,10 @@ Si vous êtes un membre Premium, [[PREMIUM_URL] cliquez ici] pour recevoir votr [[URL] Cliquez ici] pour renouveler votre abonnement. Si vous êtes un membre Premium, [[PREMIUM_URL] cliquez ici] pour recevoir votre effet de voix. + Au moins l'un de vos effets de voix expirera dans moins de [INTERVAL] jours. +[[URL] Cliquez ici] pour renouveler votre abonnement. + +Si vous êtes un membre Premium, [[PREMIUM_URL] cliquez ici] pour recevoir votre effet de voix. De nouveaux effets de voix sont disponibles ! Seuls les membres d'un certain groupe peuvent visiter cette zone. Vous ne pouvez pas pénétrer sur ce terrain car l'accès vous y est interdit. diff --git a/indra/newview/skins/default/xui/it/notifications.xml b/indra/newview/skins/default/xui/it/notifications.xml index 1c40e7304a..f79cc1515b 100644 --- a/indra/newview/skins/default/xui/it/notifications.xml +++ b/indra/newview/skins/default/xui/it/notifications.xml @@ -2453,6 +2453,10 @@ Se sei un membro Premium, [[PREMIUM_URL] fai clic qui] per ricevere in regalo la Poiché la manipolazione vocale attiva è scaduta, sono state applicate le tue impostazioni normali. [[URL] Fai clic qui] per rinnovare l'abbonamento. +Se sei un membro Premium, [[PREMIUM_URL] fai clic qui] per ricevere in regalo la manipolazione vocale. + Almeno una delle tue manipolazioni vocali scadrà tra meno di [INTERVAL] giorni. +[[URL] Fai clic qui] per rinnovare l'abbonamento. + Se sei un membro Premium, [[PREMIUM_URL] fai clic qui] per ricevere in regalo la manipolazione vocale. Sono disponibili nuove manipolazioni vocali. Soltanto i membri di un determinato gruppo possono visitare questa zona. diff --git a/indra/newview/skins/default/xui/ja/notifications.xml b/indra/newview/skins/default/xui/ja/notifications.xml index fbd56e118c..123e95df04 100644 --- a/indra/newview/skins/default/xui/ja/notifications.xml +++ b/indra/newview/skins/default/xui/ja/notifications.xml @@ -4655,6 +4655,17 @@ Webページにリンクすると、他人がこの場所に簡単にアクセ ボイスモーフィング効果の有効期限が終了したため、あなたの通常のボイス設定が適用されました。 期限を延長・更新するには[[URL] ここ]をクリックしてください。 +プレミアム会員の方は、[[PREMIUM_URL] ここ]をクリックしてボイスモーフィング特典をお受け取りください。 + + fail + + + voice + + + ボイスモーフィング効果の1つ、または複数の有効期限が[INTERVAL]日以内に終了します。 +期限を延長・更新するには[[URL] ここ]をクリックしてください。 + プレミアム会員の方は、[[PREMIUM_URL] ここ]をクリックしてボイスモーフィング特典をお受け取りください。 fail diff --git a/indra/newview/skins/default/xui/pl/notifications.xml b/indra/newview/skins/default/xui/pl/notifications.xml index 17c11bc75f..e668c6cc20 100644 --- a/indra/newview/skins/default/xui/pl/notifications.xml +++ b/indra/newview/skins/default/xui/pl/notifications.xml @@ -3116,6 +3116,11 @@ Jeśli jesteś użytkownikiem premium, to [[PREMIUM_URL] kliknij tutaj] aby otrz Czas aktywności Przekształcenia Głosu wygasł, normalne ustawienia Twojego głosu zostały zastosowane. [[URL] Kliknij tutaj] aby odnowić subskrypcję. +Jeśli jesteś użytkownikiem premium, to [[PREMIUM_URL] kliknij tutaj] aby otrzymać swój perk Przekształceń Głosu. + + + Jedno lub więcej z Twoich Przekształceń Głosu wygaśnie za mniej niż [INTERVAL] dni. +[[URL] Kliknij tutaj] aby odnowić subskrypcję. Jeśli jesteś użytkownikiem premium, to [[PREMIUM_URL] kliknij tutaj] aby otrzymać swój perk Przekształceń Głosu. diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml index 0390239669..a3220bca54 100644 --- a/indra/newview/skins/default/xui/pt/notifications.xml +++ b/indra/newview/skins/default/xui/pt/notifications.xml @@ -2440,6 +2440,10 @@ Se você é um Membro Premium, [[PREMIUM_URL] clique aqui] para receber o seu ap A Distorção de voz ativa expirou. Suas configurações de voz padrão foram ativadas. [[URL] Clique aqui] para renovar o serviço. +Se você é um Membro Premium, [[PREMIUM_URL] clique aqui] para receber o seu app de distorção de voz. + Uma ou mais das suas distorções de voz tem vencimento em menos de [INTERVAL] dias. +[[URL] Clique aqui] para renovar o serviço. + Se você é um Membro Premium, [[PREMIUM_URL] clique aqui] para receber o seu app de distorção de voz. Novas Distorções de voz! Só membros de um grupo podem acessar esta área. diff --git a/indra/newview/skins/default/xui/ru/notifications.xml b/indra/newview/skins/default/xui/ru/notifications.xml index bde18edc23..e75fd1fd82 100644 --- a/indra/newview/skins/default/xui/ru/notifications.xml +++ b/indra/newview/skins/default/xui/ru/notifications.xml @@ -3230,6 +3230,12 @@ Истек срок действия анимационного изменения голоса, действуют настройки вашего обычного голоса. [[URL] Щелкните здесь], чтобы обновить подписку. +Если вы - владелец премиум-аккаунта, [[PREMIUM_URL] щелкните здесь], чтобы получить право на анимационное изменение голоса. + + + Срок действия одного или нескольких ваших типов анимационного изменения голоса истекает через [INTERVAL] дней или раньше. +[[URL] Щелкните здесь], чтобы обновить подписку. + Если вы - владелец премиум-аккаунта, [[PREMIUM_URL] щелкните здесь], чтобы получить право на анимационное изменение голоса. diff --git a/indra/newview/skins/default/xui/tr/notifications.xml b/indra/newview/skins/default/xui/tr/notifications.xml index 30aa0c0342..17d2969d19 100644 --- a/indra/newview/skins/default/xui/tr/notifications.xml +++ b/indra/newview/skins/default/xui/tr/notifications.xml @@ -3230,6 +3230,12 @@ Aboneliğinizi yenilemek için [[URL] buraya tıklayın]. Etkin Ses Dönüşümünün süresi dolmuş, normal ses ayarlarınız uygulandı. Aboneliğinizi yenilemek için [[URL] buraya tıklayın]. +Özel Üye iseniz, ses dönüştürme özelliğini almak için [[PREMIUM_URL] buraya tıklayın]. + + + Ses Dönüşümlerinizden birinin ya da daha fazlasının süresi [INTERVAL] günden daha az bir zamanda dolacak. +Aboneliğinizi yenilemek için [[URL] buraya tıklayın]. + Özel Üye iseniz, ses dönüştürme özelliğini almak için [[PREMIUM_URL] buraya tıklayın]. diff --git a/indra/newview/skins/default/xui/zh/notifications.xml b/indra/newview/skins/default/xui/zh/notifications.xml index 3ebea7dc27..4d0f1cb85b 100644 --- a/indra/newview/skins/default/xui/zh/notifications.xml +++ b/indra/newview/skins/default/xui/zh/notifications.xml @@ -3214,6 +3214,12 @@ SHA1 指紋:[MD5_DIGEST] 使用中的變聲效果已經過期,已用你平時的聲音設定取代。 [[URL] 點按這裡]繼續訂用。 +付費用戶請[[PREMIUM_URL] 點按這裡]領取免費變聲工具。 + + + 至少一個你訂用的變聲效果將在 [INTERVAL] 天後到期。 +[[URL] 點按這裡]繼續訂用。 + 付費用戶請[[PREMIUM_URL] 點按這裡]領取免費變聲工具。 -- cgit v1.2.3 From d73395a0aa8ab4d2bb4623487be106690714524e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 24 Sep 2024 20:23:06 +0300 Subject: viewer#2413 Add 'ignore' checkbox to expiring voice morphs --- indra/newview/skins/default/xui/en/notifications.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 5ce73b2cfa..a03259bd1b 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -8870,7 +8870,11 @@ One or more of your Voice Morphs will expire in less than [INTERVAL] days. If you are a Premium Member, [[PREMIUM_URL] click here] to receive your voice morphing perk. fail - voice + voice + Date: Wed, 25 Sep 2024 18:14:45 +0300 Subject: viewer#2413 Partially remove obsolete alert about expiring voice morphs VoiceEffectsWillExpire can be triggered externally. Don't remove the notification, only viewer's code that triggers it so that external notification keeps working. --- indra/newview/app_settings/settings.xml | 11 ----------- indra/newview/llvoicevivox.cpp | 34 --------------------------------- indra/newview/llvoicevivox.h | 1 - 3 files changed, 46 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 3163f5a849..82eb98b06b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13202,17 +13202,6 @@ Value 0 - VoiceEffectExpiryWarningTime - - Comment - How much notice to give of Voice Morph subscriptions expiry, in seconds. - Persist - 1 - Type - S32 - Value - 259200 - VoiceMorphingEnabled Comment diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index e25f914c47..1e934ade59 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -6458,7 +6458,6 @@ LLVivoxVoiceClient::voiceFontEntry::voiceFontEntry(LLUUID& id) : mIsNew(false) { mExpiryTimer.stop(); - mExpiryWarningTimer.stop(); } LLVivoxVoiceClient::voiceFontEntry::~voiceFontEntry() @@ -6569,20 +6568,6 @@ void LLVivoxVoiceClient::addVoiceFont(const S32 font_index, font->mExpiryTimer.start(); font->mExpiryTimer.setExpiryAt(expiration_date.secondsSinceEpoch() - VOICE_FONT_EXPIRY_INTERVAL); - // Set the warning timer to some interval before actual expiry. - S32 warning_time = gSavedSettings.getS32("VoiceEffectExpiryWarningTime"); - if (warning_time != 0) - { - font->mExpiryWarningTimer.start(); - F64 expiry_time = (expiration_date.secondsSinceEpoch() - (F64)warning_time); - font->mExpiryWarningTimer.setExpiryAt(expiry_time - VOICE_FONT_EXPIRY_INTERVAL); - } - else - { - // Disable the warning timer. - font->mExpiryWarningTimer.stop(); - } - // Only flag new session fonts after the first time we have fetched the list. if (mVoiceFontsReceived) { @@ -6624,7 +6609,6 @@ void LLVivoxVoiceClient::expireVoiceFonts() // than checking each font individually. bool have_expired = false; - bool will_expire = false; bool expired_in_use = false; LLUUID current_effect = LLVoiceClient::instance().getVoiceEffectDefault(); @@ -6634,7 +6618,6 @@ void LLVivoxVoiceClient::expireVoiceFonts() { voiceFontEntry* voice_font = iter->second; LLFrameTimer& expiry_timer = voice_font->mExpiryTimer; - LLFrameTimer& warning_timer = voice_font->mExpiryWarningTimer; // Check for expired voice fonts if (expiry_timer.getStarted() && expiry_timer.hasExpired()) @@ -6651,14 +6634,6 @@ void LLVivoxVoiceClient::expireVoiceFonts() deleteVoiceFont(voice_font->mID); have_expired = true; } - - // Check for voice fonts that will expire in less that the warning time - if (warning_timer.getStarted() && warning_timer.hasExpired()) - { - LL_DEBUGS("VoiceFont") << "Voice Font " << voice_font->mName << " will expire soon." << LL_ENDL; - will_expire = true; - warning_timer.stop(); - } } LLSD args; @@ -6680,15 +6655,6 @@ void LLVivoxVoiceClient::expireVoiceFonts() // Refresh voice font lists in the UI. notifyVoiceFontObservers(); } - - // Give a warning notification if any voice fonts are due to expire. - if (will_expire) - { - S32Seconds seconds(gSavedSettings.getS32("VoiceEffectExpiryWarningTime")); - args["INTERVAL"] = llformat("%d", LLUnit(seconds).value()); - - LLNotificationsUtil::add("VoiceEffectsWillExpire", args); - } } void LLVivoxVoiceClient::deleteVoiceFont(const LLUUID& id) diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 7862e492b2..3167705528 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -880,7 +880,6 @@ private: bool mIsNew; LLFrameTimer mExpiryTimer; - LLFrameTimer mExpiryWarningTimer; }; bool mVoiceFontsReceived; -- cgit v1.2.3 From 49a2c136f99cf90abc94f1ce84d3c6f2be2815d0 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 25 Sep 2024 21:35:20 +0300 Subject: viewer#2646 Fix viewer ignoring Physics Shape Type changes asStringRef is only valid for strings --- indra/llui/llcombobox.cpp | 2 +- indra/llui/llscrolllistctrl.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index a1c16ccdec..f3876ef695 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -365,7 +365,7 @@ void LLComboBox::setValue(const LLSD& value) if (LLScrollListItem* item = mList->getFirstSelected()) { LLSD item_value = item->getValue(); - if (item_value.asStringRef() == value.asStringRef()) + if (item_value.asString() == value.asString()) return; } diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 445377d3a2..93bd3c6bed 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -490,12 +490,12 @@ std::vector LLScrollListCtrl::getAllData() const // returns first matching item LLScrollListItem* LLScrollListCtrl::getItem(const LLSD& sd) const { - const std::string& string_val = sd.asStringRef(); + std::string string_val = sd.asString(); for (LLScrollListItem* item : mItemList) { // assumes string representation is good enough for comparison - if (item->getValue().asStringRef() == string_val) + if (item->getValue().asString() == string_val) { return item; } -- cgit v1.2.3 From 440c7b20dab3aa09c04bf3e72b4997181e585cbb Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 26 Sep 2024 18:09:32 +0300 Subject: #2411 Allow disabling and enabling LLFontVertexBuffer for testing purposes --- indra/llrender/llfontvertexbuffer.cpp | 7 +++++++ indra/llrender/llfontvertexbuffer.h | 4 ++++ indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/pipeline.cpp | 14 +++++++++++++- indra/newview/skins/default/xui/en/menu_viewer.xml | 10 ++++++++++ 5 files changed, 45 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llrender/llfontvertexbuffer.cpp b/indra/llrender/llfontvertexbuffer.cpp index 392f235aad..f5d6b03cd6 100644 --- a/indra/llrender/llfontvertexbuffer.cpp +++ b/indra/llrender/llfontvertexbuffer.cpp @@ -31,6 +31,8 @@ #include "llvertexbuffer.h" +bool LLFontVertexBuffer::sEnableBufferCollection = true; + LLFontVertexBuffer::LLFontVertexBuffer() { } @@ -119,6 +121,11 @@ S32 LLFontVertexBuffer::render( { return static_cast(text.length()); } + if (!sEnableBufferCollection) + { + // For debug purposes and performance testing + return fontp->render(text, begin_offset, x, y, color, halign, valign, style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color); + } if (mBufferList.empty()) { genBuffers(fontp, text, begin_offset, x, y, color, halign, valign, diff --git a/indra/llrender/llfontvertexbuffer.h b/indra/llrender/llfontvertexbuffer.h index 67cf2ca13c..59cb536b74 100644 --- a/indra/llrender/llfontvertexbuffer.h +++ b/indra/llrender/llfontvertexbuffer.h @@ -78,6 +78,8 @@ public: F32* right_x = NULL, bool use_ellipses = false, bool use_color = true); + + static void enableBufferCollection(bool enable) { sEnableBufferCollection = enable; } private: void genBuffers(const LLFontGL* fontp, @@ -114,6 +116,8 @@ private: F32 mLastScaleX = 1.f; F32 mLastScaleY = 1.f; LLCoordGL mLastOrigin; + + static bool sEnableBufferCollection; }; #endif diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 82eb98b06b..7c9cfb94fa 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9564,6 +9564,17 @@ Value 0 + CollectFontVertexBuffers + + Comment + When enabled some UI elements with cache buffers generated by fonts and reuse them. When disabled general cahce will be used with a significant overhead for hash, but it regenerates vertices each frame so it's always up to date. + Persist + 0 + Type + Boolean + Value + 1 + ShowMyComplexityChanges Comment diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index fe02742aac..39652ff6af 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -35,6 +35,7 @@ #include "llviewercontrol.h" #include "llfasttimer.h" #include "llfontgl.h" +#include "llfontvertexbuffer.h" #include "llnamevalue.h" #include "llpointer.h" #include "llprimitive.h" @@ -579,7 +580,16 @@ void LLPipeline::init() connectRefreshCachedSettingsSafe("RenderMirrors"); connectRefreshCachedSettingsSafe("RenderHeroProbeUpdateRate"); connectRefreshCachedSettingsSafe("RenderHeroProbeConservativeUpdateMultiplier"); - gSavedSettings.getControl("RenderAutoHideSurfaceAreaLimit")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); + connectRefreshCachedSettingsSafe("RenderAutoHideSurfaceAreaLimit"); + + LLPointer cntrl_ptr = gSavedSettings.getControl("CollectFontVertexBuffers"); + if (cntrl_ptr.notNull()) + { + cntrl_ptr->getCommitSignal()->connect([](LLControlVariable* control, const LLSD& value, const LLSD& previous) + { + LLFontVertexBuffer::enableBufferCollection(control->getValue().asBoolean()); + }); + } } LLPipeline::~LLPipeline() @@ -1096,6 +1106,8 @@ void LLPipeline::refreshCachedSettings() LLVOAvatar::sMaxNonImpostors = 1; LLVOAvatar::updateImpostorRendering(LLVOAvatar::sMaxNonImpostors); } + + LLFontVertexBuffer::enableBufferCollection(gSavedSettings.getBOOL("CollectFontVertexBuffers")); } void LLPipeline::releaseGLBuffers() diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 324e868bd5..77aa73a4c9 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -3435,6 +3435,16 @@ function="World.EnvPreset" function="Advanced.HandleAttachedLightParticles" parameter="RenderAttachedParticles" /> + + + + Date: Thu, 26 Sep 2024 21:26:48 +0300 Subject: #2411 Disable LLFontVertexBuffer for HUD It needs a rework --- indra/newview/llhudnametag.cpp | 23 ++-------------------- indra/newview/llhudnametag.h | 3 --- indra/newview/llhudrender.cpp | 13 ++---------- indra/newview/llhudrender.h | 2 -- indra/newview/llhudtext.cpp | 16 +-------------- indra/newview/llhudtext.h | 2 -- indra/newview/llmanip.cpp | 10 +++++----- indra/newview/llmaniprotate.cpp | 4 ++-- indra/newview/llmanipscale.cpp | 4 ++-- indra/newview/llmaniptranslate.cpp | 4 ++-- indra/newview/skins/default/xui/en/menu_viewer.xml | 4 ++-- 11 files changed, 18 insertions(+), 67 deletions(-) (limited to 'indra') diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp index 19ae35813c..11f049564a 100644 --- a/indra/newview/llhudnametag.cpp +++ b/indra/newview/llhudnametag.cpp @@ -290,15 +290,6 @@ void LLHUDNameTag::renderText() LLVector3 render_position = mPositionAgent + (x_pixel_vec * screen_offset.mV[VX]) + (y_pixel_vec * screen_offset.mV[VY]); - bool reset_buffers = false; - const F32 treshold = 0.000001f; - if (abs(mLastRenderPosition.mV[VX] - render_position.mV[VX]) > treshold - || abs(mLastRenderPosition.mV[VY] - render_position.mV[VY]) > treshold - || abs(mLastRenderPosition.mV[VZ] - render_position.mV[VZ]) > treshold) - { - reset_buffers = true; - mLastRenderPosition = render_position; - } LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); LLRect screen_rect; @@ -322,11 +313,6 @@ void LLHUDNameTag::renderText() for(std::vector::iterator segment_iter = mLabelSegments.begin(); segment_iter != mLabelSegments.end(); ++segment_iter ) { - if (reset_buffers) - { - segment_iter->mFontBufferLabel.reset(); - } - // Label segments use default font const LLFontGL* fontp = (segment_iter->mStyle == LLFontGL::BOLD) ? mBoldFontp : mFontp; y_offset -= fontp->getLineHeight(); @@ -342,7 +328,7 @@ void LLHUDNameTag::renderText() } LLColor4 label_color(0.f, 0.f, 0.f, alpha_factor); - hud_render_text(segment_iter->getText(), render_position, &segment_iter->mFontBufferLabel, *fontp, segment_iter->mStyle, LLFontGL::NO_SHADOW, x_offset, y_offset, label_color, false); + hud_render_text(segment_iter->getText(), render_position, *fontp, segment_iter->mStyle, LLFontGL::NO_SHADOW, x_offset, y_offset, label_color, false); } } @@ -364,11 +350,6 @@ void LLHUDNameTag::renderText() for (std::vector::iterator segment_iter = mTextSegments.begin() + start_segment; segment_iter != mTextSegments.end(); ++segment_iter ) { - if (reset_buffers) - { - segment_iter->mFontBufferText.reset(); - } - const LLFontGL* fontp = segment_iter->mFont; y_offset -= fontp->getLineHeight(); y_offset -= LINE_PADDING; @@ -392,7 +373,7 @@ void LLHUDNameTag::renderText() text_color = segment_iter->mColor; text_color.mV[VALPHA] *= alpha_factor; - hud_render_text(segment_iter->getText(), render_position, &segment_iter->mFontBufferText, *fontp, style, shadow, x_offset, y_offset, text_color, false); + hud_render_text(segment_iter->getText(), render_position, *fontp, style, shadow, x_offset, y_offset, text_color, false); } } /// Reset the default color to white. The renderer expects this to be the default. diff --git a/indra/newview/llhudnametag.h b/indra/newview/llhudnametag.h index b48a606982..ee66187345 100644 --- a/indra/newview/llhudnametag.h +++ b/indra/newview/llhudnametag.h @@ -68,8 +68,6 @@ protected: LLColor4 mColor; LLFontGL::StyleFlags mStyle; const LLFontGL* mFont; - LLFontVertexBuffer mFontBufferLabel; - LLFontVertexBuffer mFontBufferText; private: LLWString mText; std::map mFontWidthMap; @@ -177,7 +175,6 @@ private: S32 mMaxLines; S32 mOffsetY; F32 mRadius; - LLVector3 mLastRenderPosition; std::vector mTextSegments; std::vector mLabelSegments; // LLFrameTimer mResizeTimer; diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp index 4180e49e94..135fba7897 100644 --- a/indra/newview/llhudrender.cpp +++ b/indra/newview/llhudrender.cpp @@ -42,7 +42,6 @@ #include void hud_render_utf8text(const std::string &str, const LLVector3 &pos_agent, - LLFontVertexBuffer *font_buffer, const LLFontGL &font, const U8 style, const LLFontGL::ShadowType shadow, @@ -51,11 +50,10 @@ void hud_render_utf8text(const std::string &str, const LLVector3 &pos_agent, const bool orthographic) { LLWString wstr(utf8str_to_wstring(str)); - hud_render_text(wstr, pos_agent, font_buffer, font, style, shadow, x_offset, y_offset, color, orthographic); + hud_render_text(wstr, pos_agent, font, style, shadow, x_offset, y_offset, color, orthographic); } void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent, - LLFontVertexBuffer *font_buffer, const LLFontGL &font, const U8 style, const LLFontGL::ShadowType shadow, @@ -127,14 +125,7 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent, LLUI::translate((F32) win_coord.x*1.0f/LLFontGL::sScaleX, (F32) win_coord.y*1.0f/(LLFontGL::sScaleY), -(((F32) win_coord.z*2.f)-1.f)); F32 right_x; - if (font_buffer) - { - font_buffer->render(&font, wstr, 0, 0, 1, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, static_cast(wstr.length()), 1000, &right_x, /*use_ellipses*/false, /*use_color*/true); - } - else - { - font.render(wstr, 0, 0, 1, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, static_cast(wstr.length()), 1000, &right_x, /*use_ellipses*/false, /*use_color*/true); - } + font.render(wstr, 0, 0, 1, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, static_cast(wstr.length()), 1000, &right_x, /*use_ellipses*/false, /*use_color*/true); LLUI::popMatrix(); gGL.popMatrix(); diff --git a/indra/newview/llhudrender.h b/indra/newview/llhudrender.h index be9fc7f084..3c71acb271 100644 --- a/indra/newview/llhudrender.h +++ b/indra/newview/llhudrender.h @@ -36,7 +36,6 @@ class LLFontGL; // Utility classes for rendering HUD elements void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent, - LLFontVertexBuffer *font_buffer, const LLFontGL &font, const U8 style, const LLFontGL::ShadowType, @@ -48,7 +47,6 @@ void hud_render_text(const LLWString &wstr, // Legacy, slower void hud_render_utf8text(const std::string &str, const LLVector3 &pos_agent, - LLFontVertexBuffer *font_buffer, const LLFontGL &font, const U8 style, const LLFontGL::ShadowType, diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 818474a0cb..fd0d8b696f 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -185,15 +185,6 @@ void LLHUDText::renderText() LLVector3 render_position = mPositionAgent + (x_pixel_vec * screen_offset.mV[VX]) + (y_pixel_vec * screen_offset.mV[VY]); - bool reset_buffers = false; - const F32 treshold = 0.000001f; - if (abs(mLastRenderPosition.mV[VX] - render_position.mV[VX]) > treshold - || abs(mLastRenderPosition.mV[VY] - render_position.mV[VY]) > treshold - || abs(mLastRenderPosition.mV[VZ] - render_position.mV[VZ]) > treshold) - { - reset_buffers = true; - mLastRenderPosition = render_position; - } F32 y_offset = (F32)mOffsetY; @@ -217,11 +208,6 @@ void LLHUDText::renderText() for (std::vector::iterator segment_iter = mTextSegments.begin() + start_segment; segment_iter != mTextSegments.end(); ++segment_iter ) { - if (reset_buffers) - { - segment_iter->mFontBufferText.reset(); - } - const LLFontGL* fontp = segment_iter->mFont; y_offset -= fontp->getLineHeight() - 1; // correction factor to match legacy font metrics @@ -245,7 +231,7 @@ void LLHUDText::renderText() } text_color.mV[VALPHA] *= alpha_factor; - hud_render_text(segment_iter->getText(), render_position, &segment_iter->mFontBufferText, *fontp, style, shadow, x_offset, y_offset, text_color, mOnHUDAttachment); + hud_render_text(segment_iter->getText(), render_position, *fontp, style, shadow, x_offset, y_offset, text_color, mOnHUDAttachment); } } /// Reset the default color to white. The renderer expects this to be the default. diff --git a/indra/newview/llhudtext.h b/indra/newview/llhudtext.h index 4c850e2d91..3bc33f1478 100644 --- a/indra/newview/llhudtext.h +++ b/indra/newview/llhudtext.h @@ -68,7 +68,6 @@ protected: LLFontGL::StyleFlags mStyle; const LLFontGL* mFont; LLFontVertexBuffer mFontBuffer; - LLFontVertexBuffer mFontBufferText; private: LLWString mText; std::map mFontWidthMap; @@ -154,7 +153,6 @@ private: const LLFontGL* mBoldFontp; LLRectf mSoftScreenRect; LLVector3 mPositionAgent; - LLVector3 mLastRenderPosition; LLVector2 mPositionOffset; LLVector2 mTargetPositionOffset; F32 mMass; diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index 9a0b1bfcd6..0d617753c8 100644 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -519,9 +519,9 @@ void LLManip::renderTickText(const LLVector3& pos, const std::string& text, cons LLColor4 shadow_color = LLColor4::black; shadow_color.mV[VALPHA] = color.mV[VALPHA] * 0.5f; gViewerWindow->setup3DViewport(1, -1); - hud_render_utf8text(text, render_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(text), 3.f, shadow_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); + hud_render_utf8text(text, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(text), 3.f, shadow_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); gViewerWindow->setup3DViewport(); - hud_render_utf8text(text, render_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(text), 3.f, color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); + hud_render_utf8text(text, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(text), 3.f, color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); gGL.popMatrix(); } @@ -581,12 +581,12 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string { fraction_string = llformat("%c%02d%s", LLResMgr::getInstance()->getDecimalPoint(), fractional_portion, suffix.c_str()); - hud_render_utf8text(val_string, render_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, -1.f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection); - hud_render_utf8text(fraction_string, render_pos, nullptr, *small_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, 1.f, 3.f, color, hud_selection); + hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, -1.f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection); + hud_render_utf8text(fraction_string, render_pos, *small_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, 1.f, 3.f, color, hud_selection); } else { - hud_render_utf8text(val_string, render_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, -0.5f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection); + hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, -0.5f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection); } } gGL.popMatrix(); diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index 0d80b8d8ba..5bdf3f81b5 100644 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -1169,10 +1169,10 @@ void LLManipRotate::renderSnapGuides() std::string help_text = LLTrans::getString("manip_hint1"); LLColor4 help_text_color = LLColor4::white; help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, line_alpha, 0.f); - hud_render_utf8text(help_text, help_text_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); help_text = LLTrans::getString("manip_hint2"); help_text_pos -= offset_dir * mRadiusMeters * 0.4f; - hud_render_utf8text(help_text, help_text_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); } } } diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 9966a8eedb..66420d1cad 100644 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -1844,10 +1844,10 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) std::string help_text = LLTrans::getString("manip_hint1"); LLColor4 help_text_color = LLColor4::white; help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, grid_alpha, 0.f); - hud_render_utf8text(help_text, help_text_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); help_text = LLTrans::getString("manip_hint2"); help_text_pos -= LLViewerCamera::getInstance()->getUpAxis() * mSnapRegimeOffset * 0.4f; - hud_render_utf8text(help_text, help_text_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); } } } diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 060fe0d600..0888f630e8 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -1449,10 +1449,10 @@ void LLManipTranslate::renderSnapGuides() std::string help_text = LLTrans::getString("manip_hint1"); LLColor4 help_text_color = LLColor4::white; help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, line_alpha, 0.f); - hud_render_utf8text(help_text, help_text_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); help_text = LLTrans::getString("manip_hint2"); help_text_pos -= LLViewerCamera::getInstance()->getUpAxis() * mSnapOffsetMeters * 0.2f; - hud_render_utf8text(help_text, help_text_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); } } } diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 77aa73a4c9..6f0c391cf3 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -3436,8 +3436,8 @@ function="World.EnvPreset" parameter="RenderAttachedParticles" /> + label="Collect Font Vertex Buffers" + name="Collect Font Vertex Buffers"> -- cgit v1.2.3 From e74b48e67842c5c745f9ab0be2e33d7d077001e3 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 26 Sep 2024 22:03:45 +0300 Subject: viewer#2709 Fix loose triangle --- indra/llrender/llrender2dutils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp index 20ad0275bd..c3d5da0914 100644 --- a/indra/llrender/llrender2dutils.cpp +++ b/indra/llrender/llrender2dutils.cpp @@ -1712,10 +1712,10 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv gGL.vertex3fv((center_draw_rect.mRight * width_vec + height_vec).mV); gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mTop); - gGL.vertex3fv((center_draw_rect.mLeft* width_vec + center_draw_rect.mTop * height_vec).mV); + gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mTop * height_vec).mV); - gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mTop); - gGL.vertex3fv((center_draw_rect.mRight* width_vec + center_draw_rect.mTop * height_vec).mV); + gGL.texCoord2f(center_uv_rect.mRight, clip_rect.mTop); + gGL.vertex3fv((center_draw_rect.mRight* width_vec + height_vec).mV); gGL.texCoord2f(center_uv_rect.mLeft, clip_rect.mTop); gGL.vertex3fv((center_draw_rect.mLeft * width_vec + height_vec).mV); -- cgit v1.2.3 From 64c055f9be03861661f8c211ae36ba0db489b12d Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 26 Sep 2024 20:59:01 +0300 Subject: viewer#2653 fix texture readback not being called and not setting values properly Ex: Saving textures to hard drive sometimes fails --- indra/newview/llviewertexture.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'indra') diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 9e1cb84bd1..0f9c65893d 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -2495,6 +2495,11 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() } } + if (need_readback) + { + readbackRawImage(); + } + // // Run raw/auxiliary data callbacks // @@ -2744,10 +2749,22 @@ void LLViewerFetchedTexture::readbackRawImage() if (mGLTexturep.notNull() && mGLTexturep->getTexName() != 0 && (mRawImage.isNull() || mRawImage->getWidth() < mGLTexturep->getWidth() || mRawImage->getHeight() < mGLTexturep->getHeight() )) { + if (mRawImage.isNull()) + { + sRawCount++; + } mRawImage = new LLImageRaw(); if (!mGLTexturep->readBackRaw(-1, mRawImage, false)) { mRawImage = nullptr; + mIsRawImageValid = false; + mRawDiscardLevel = INVALID_DISCARD_LEVEL; + sRawCount--; + } + else + { + mIsRawImageValid = true; + mRawDiscardLevel = mGLTexturep->getDiscardLevel(); } } } -- cgit v1.2.3 From c89bfa2ee2d1817af76f586a713d14b4f0e15344 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 30 Sep 2024 16:43:14 +0300 Subject: Revert "viewer#2363 Region Day Offset error with Time of Day" --- indra/newview/llenvironment.cpp | 1 - indra/newview/llpanelenvironment.cpp | 16 +++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) (limited to 'indra') diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 722c565300..05bd704556 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -2087,7 +2087,6 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInf body[KEY_ENVIRONMENT][KEY_DAYLENGTH] = updates->mDayLength; } - // server only allows positive values if (updates->mDayOffset > 0) { body[KEY_ENVIRONMENT][KEY_DAYOFFSET] = updates->mDayOffset; diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index 7dd9f6e86e..be61c44b7c 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -287,8 +287,8 @@ void LLPanelEnvironmentInfo::refresh() F32Hours daylength(mCurrentEnvironment->mDayLength); F32Hours dayoffset(mCurrentEnvironment->mDayOffset); - while (dayoffset.value() >= daylength.value()) - dayoffset -= daylength; + if (dayoffset.value() > 12.0f) + dayoffset -= F32Hours(24.0); mSliderDayLength->setValue(daylength.value()); mSliderDayOffset->setValue(dayoffset.value()); @@ -717,11 +717,6 @@ void LLPanelEnvironmentInfo::onSldDayLengthChanged(F32 value) F32Hours daylength(value); mCurrentEnvironment->mDayLength = daylength; - F32 offset = (F32)mSliderDayOffset->getValue().asReal(); - if (offset <= 0.0f) - { - onSldDayOffsetChanged(offset); - } setDirtyFlag(DIRTY_FLAG_DAYLENGTH); udpateApparentTimeOfDay(); @@ -734,9 +729,8 @@ void LLPanelEnvironmentInfo::onSldDayOffsetChanged(F32 value) { F32Hours dayoffset(value); - // server only allows positive values - while (dayoffset.value() <= 0.0f) - dayoffset += mCurrentEnvironment->mDayLength; + if (dayoffset.value() <= 0.0f) + dayoffset += F32Hours(24.0); mCurrentEnvironment->mDayOffset = dayoffset; setDirtyFlag(DIRTY_FLAG_DAYOFFSET); @@ -928,7 +922,7 @@ void LLPanelEnvironmentInfo::udpateApparentTimeOfDay() { static const F32 SECONDSINDAY(24.0 * 60.0 * 60.0); - if ((!mCurrentEnvironment) || (mCurrentEnvironment->mDayLength.value() < 1.0)) + if ((!mCurrentEnvironment) || (mCurrentEnvironment->mDayLength.value() < 1.0) || (mCurrentEnvironment->mDayOffset.value() < 1.0)) { mLabelApparentTime->setVisible(false); return; -- cgit v1.2.3 From c954609958d5fe2edbdc2f80af9bba5dc8025341 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 30 Sep 2024 21:21:16 +0300 Subject: viewer#2735 Fix day cycle not saving values --- indra/llinventory/llsettingsdaycycle.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra') diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp index a45ab5a09c..2baf140e6a 100644 --- a/indra/llinventory/llsettingsdaycycle.cpp +++ b/indra/llinventory/llsettingsdaycycle.cpp @@ -143,10 +143,6 @@ LLSettingsDay::LLSettingsDay() : //========================================================================= LLSD& LLSettingsDay::getSettings() { - if (mDaySettings.size() > 0) - { - return mDaySettings; - } mDaySettings = LLSD::emptyMap(); LLSD& settings = LLSettingsBase::getSettings(); -- cgit v1.2.3 From 690f099519e155220535e07539238139b16da99f Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Thu, 26 Sep 2024 21:26:59 +0300 Subject: #2519 Move "MediaSoundsEarLocation" and "VoiceEarLocation" toggles to the Communicate menu (#2707) --- indra/newview/skins/default/xui/en/menu_viewer.xml | 37 +++++++++++----------- 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 6f0c391cf3..a03024487f 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -465,24 +465,6 @@ - - - - - - - - - + + + + + + + + + +