diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2011-02-23 11:10:13 -0700 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2011-02-23 11:10:13 -0700 |
commit | bfa25219b899636db74bedc258bc763caf91ddf0 (patch) | |
tree | d9d82b63d9d5d3d784b4bee852f9caed2c897a71 /indra/newview/llfloaterhardwaresettings.cpp | |
parent | bcb5b209d1813681202524362dd186c8b0982357 (diff) | |
parent | 01cdeb0cdd8c48b76a229d42ced4e5563cd18c5c (diff) |
Automated merge with ssh://hg.lindenlab.com/bao/private-memory-pool
Diffstat (limited to 'indra/newview/llfloaterhardwaresettings.cpp')
-rw-r--r-- | indra/newview/llfloaterhardwaresettings.cpp | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp index 7bf158488f..1e91710552 100644 --- a/indra/newview/llfloaterhardwaresettings.cpp +++ b/indra/newview/llfloaterhardwaresettings.cpp @@ -50,6 +50,7 @@ LLFloaterHardwareSettings::LLFloaterHardwareSettings(const LLSD& key) // but init them anyway mUseVBO(0), mUseAniso(0), + mUseFBO(0), mFSAASamples(0), mGamma(0.0), mVideoCardMem(0), @@ -74,6 +75,7 @@ void LLFloaterHardwareSettings::refresh() mUseVBO = gSavedSettings.getBOOL("RenderVBOEnable"); mUseAniso = gSavedSettings.getBOOL("RenderAnisotropic"); + mUseFBO = gSavedSettings.getBOOL("RenderUseFBO"); mFSAASamples = gSavedSettings.getU32("RenderFSAASamples"); mGamma = gSavedSettings.getF32("RenderGamma"); mVideoCardMem = gSavedSettings.getS32("TextureMemory"); @@ -102,6 +104,8 @@ void LLFloaterHardwareSettings::refreshEnabledState() getChildView("(brightness, lower is brighter)")->setEnabled(!gPipeline.canUseWindLightShaders()); getChildView("fog")->setEnabled(!gPipeline.canUseWindLightShaders()); getChildView("fsaa")->setEnabled(gPipeline.canUseAntiAliasing()); + getChildView("antialiasing restart")->setVisible(!gSavedSettings.getBOOL("RenderUseFBO")); + /* Enable to reset fsaa value to disabled when feature is not available. if (!gPipeline.canUseAntiAliasing()) { @@ -127,30 +131,6 @@ BOOL LLFloaterHardwareSettings::postBuild() void LLFloaterHardwareSettings::apply() { - // Anisotropic rendering - BOOL old_anisotropic = LLImageGL::sGlobalUseAnisotropic; - LLImageGL::sGlobalUseAnisotropic = getChild<LLUICtrl>("ani")->getValue(); - - U32 fsaa = (U32) getChild<LLUICtrl>("fsaa")->getValue().asInteger(); - U32 old_fsaa = gSavedSettings.getU32("RenderFSAASamples"); - - BOOL logged_in = (LLStartUp::getStartupState() >= STATE_STARTED); - - if (old_fsaa != fsaa) - { - gSavedSettings.setU32("RenderFSAASamples", fsaa); - LLWindow* window = gViewerWindow->getWindow(); - LLCoordScreen size; - window->getSize(&size); - gViewerWindow->changeDisplaySettings(size, - gSavedSettings.getBOOL("DisableVerticalSync"), - logged_in); - } - else if (old_anisotropic != LLImageGL::sGlobalUseAnisotropic) - { - gViewerWindow->restartDisplay(logged_in); - } - refresh(); } @@ -159,6 +139,7 @@ void LLFloaterHardwareSettings::cancel() { gSavedSettings.setBOOL("RenderVBOEnable", mUseVBO); gSavedSettings.setBOOL("RenderAnisotropic", mUseAniso); + gSavedSettings.setBOOL("RenderUseFBO", mUseFBO); gSavedSettings.setU32("RenderFSAASamples", mFSAASamples); gSavedSettings.setF32("RenderGamma", mGamma); gSavedSettings.setS32("TextureMemory", mVideoCardMem); |