Streamed vbo checkbox wasn't enabling/disabling on RenderUseVBO change.

This commit is contained in:
Shyotl
2011-06-13 23:22:09 -05:00
parent 43fd687b7c
commit 28098c79d2
2 changed files with 13 additions and 0 deletions

View File

@@ -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();
}
//============================================================================

View File

@@ -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;