Restore applying anti-aliasing from preferences

This commit is contained in:
Siana Gearz
2012-09-02 06:39:50 +02:00
parent b4a7fa1ad9
commit 566d70a6d1
2 changed files with 6 additions and 2 deletions

View File

@@ -876,6 +876,10 @@ void LLPanelDisplay::cancel()
void LLPanelDisplay::apply()
{
U32 fsaa_value = childGetValue("fsaa").asInteger();
bool apply_fsaa_change = !LLRenderTarget::sUseFBO && (mFSAASamples != fsaa_value);
gSavedSettings.setU32("RenderFSAASamples", fsaa_value);
applyResolution();
// Only set window size if we're not in fullscreen mode
@@ -887,7 +891,7 @@ void LLPanelDisplay::apply()
// Hardware tab
//Still do a bit of voodoo here. V2 forces restart to change FSAA with FBOs off.
//Let's not do that, and instead do pre-V2 FSAA change handling for that particular case
if(!LLRenderTarget::sUseFBO && (mFSAASamples != (U32)childGetValue("fsaa").asInteger()))
if(apply_fsaa_change)
{
bool logged_in = (LLStartUp::getStartupState() >= STATE_STARTED);
LLWindow* window = gViewerWindow->getWindow();

View File

@@ -112,7 +112,7 @@
<panel border="true" bottom="-400" height="244" left="50" name="Hardware" label="Hardware" width="500">
<check_box bottom="-22" control_name="RenderAnisotropic" height="16" initial_value="false" label="Anisotropic Filtering (slower when enabled)" left="5" name="ani" width="256"/>
<text bottom="-37" height="12" left="10" name="Antialiasing:" width="128">Antialiasing:</text>
<combo_box bottom="-41" control_name="RenderFSAASamples" height="16" initial_value="false" label="Antialiasing" left="148" name="fsaa" width="64">
<combo_box bottom="-41" height="16" initial_value="false" label="Antialiasing" left="148" name="fsaa" width="64">
<combo_item name="FSAADisabled" value="0">Disabled</combo_item>
<combo_item name="2x" value="2">2x</combo_item>
<combo_item name="4x" value="4">4x</combo_item>