From 28098c79d2d6776182595047499e862e080a8ac2 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Mon, 13 Jun 2011 23:22:09 -0500 Subject: [PATCH] Streamed vbo checkbox wasn't enabling/disabling on RenderUseVBO change. --- indra/newview/llfloaterhardwaresettings.cpp | 8 ++++++++ indra/newview/llfloaterhardwaresettings.h | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp index 2e5a4a7f5..23da0629b 100644 --- a/indra/newview/llfloaterhardwaresettings.cpp +++ b/indra/newview/llfloaterhardwaresettings.cpp @@ -96,6 +96,7 @@ void LLFloaterHardwareSettings::refreshEnabledState() childSetMinValue("GrapicsCardTextureMemory", min_tex_mem); childSetMaxValue("GrapicsCardTextureMemory", max_tex_mem); + mLastVBOState = LLVertexBuffer::sEnableVBOs; if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") || !gGLManager.mHasVertexBufferObject) { @@ -158,6 +159,13 @@ void LLFloaterHardwareSettings::onClose(bool app_quitting) } } +// virtual +void LLFloaterHardwareSettings::draw() +{ + if(mLastVBOState == !LLVertexBuffer::sEnableVBOs) + refreshEnabledState(); + LLFloater::draw(); +} //============================================================================ diff --git a/indra/newview/llfloaterhardwaresettings.h b/indra/newview/llfloaterhardwaresettings.h index bdf3fb13b..0d78d67a2 100644 --- a/indra/newview/llfloaterhardwaresettings.h +++ b/indra/newview/llfloaterhardwaresettings.h @@ -75,6 +75,9 @@ public: /// sync up menu with parameters void refresh(); + /// Draw the panel... + void draw(); + /// Apply the changed values. void apply(); @@ -87,6 +90,7 @@ public: protected: LLSliderCtrl* mCtrlVideoCardMem; + //Retained values for cancel/reset BOOL mUseVBO; BOOL mUseFBO; BOOL mUseAniso; @@ -96,6 +100,7 @@ protected: F32 mFogRatio; BOOL mProbeHardwareOnStartup; + bool mLastVBOState; //track changes to LLVertexBuffer::sEnableVBOs every frame. Bleh. private: // one instance on the inside static LLFloaterHardwareSettings* sHardwareSettings;