diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7e7bb4796..301624f94 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -846,6 +846,17 @@ Found in Advanced->Rendering->Info Displays Value 0 + SLBShowFPS + + Comment + Show FPS + Persist + 1 + Type + Boolean + Value + 0 + LogShowHistoryLines Comment diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1526fc8c1..ae8f23910 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1204,6 +1204,7 @@ void init_debug_ui_menu(LLMenuGL* menu) menu->addChild(new LLMenuItemCheckGL("Show Render Info", menu_toggle_control, NULL, menu_check_control, (void*)"DebugShowRenderInfo")); menu->addChild(new LLMenuItemCheckGL("Show Matrices", menu_toggle_control, NULL, menu_check_control, (void*)"DebugShowRenderMatrices")); menu->addChild(new LLMenuItemCheckGL("Show Color Under Cursor", menu_toggle_control, NULL, menu_check_control, (void*)"DebugShowColor")); + menu->addChild(new LLMenuItemCheckGL("Show FPS", menu_toggle_control, NULL, menu_check_control, (void*)"SLBShowFPS")); menu->createJumpKeys(); } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 3e57959b4..867d10857 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -729,6 +729,13 @@ public: ypos += y_inc; } + static const LLCachedControl slb_show_fps("SLBShowFPS"); + if (slb_show_fps) + { + addText(xpos+280, ypos+5, llformat("FPS %3.1f", LLViewerStats::getInstance()->mFPSStat.getMeanPerSec())); + ypos += y_inc; + } + static const LLCachedControl DebugShowPrivateMem("DebugShowPrivateMem",false); if (DebugShowPrivateMem) {