SH-358 FIXED Non-FBO driven fix for anti-aliasing (make applying of FSAA require restart when FBO is disabled).

Loren Shih 2010-11-04 16:53:14 -04:00
parent b827f4d2aa
commit 0347844b34
4 changed files with 20 additions and 5 deletions

View File

@ -104,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())
{
@ -130,7 +132,8 @@ BOOL LLFloaterHardwareSettings::postBuild()
void LLFloaterHardwareSettings::apply()
{
// Anisotropic rendering
BOOL old_anisotropic = LLImageGL::sGlobalUseAnisotropic;
//Do nothing here -- this code is unreliable, and UI now tells users to restart for changes to take affect
/*BOOL old_anisotropic = LLImageGL::sGlobalUseAnisotropic;
LLImageGL::sGlobalUseAnisotropic = getChild<LLUICtrl>("ani")->getValue();
U32 fsaa = (U32) getChild<LLUICtrl>("fsaa")->getValue().asInteger();
@ -151,7 +154,7 @@ void LLFloaterHardwareSettings::apply()
else if (old_anisotropic != LLImageGL::sGlobalUseAnisotropic)
{
gViewerWindow->restartDisplay(logged_in);
}
}*/
refresh();
}

View File

@ -1341,7 +1341,7 @@ LLViewerWindow::LLViewerWindow(
gSavedSettings.getBOOL("DisableVerticalSync"),
!gNoRender,
ignore_pixel_depth,
0); //gSavedSettings.getU32("RenderFSAASamples"));
gSavedSettings.getBOOL("RenderUseFBO") ? 0 : gSavedSettings.getU32("RenderFSAASamples")); //don't use window level anti-aliasing if FBOs are enabled
if (!LLAppViewer::instance()->restoreErrorTrap())
{

View File

@ -873,7 +873,7 @@ BOOL LLPipeline::canUseWindLightShadersOnObjects() const
BOOL LLPipeline::canUseAntiAliasing() const
{
return (gSavedSettings.getBOOL("RenderUseFBO"));
return TRUE; //(gSavedSettings.getBOOL("RenderUseFBO"));
}
void LLPipeline::unloadShaders()

View File

@ -22,7 +22,7 @@
<check_box
control_name="RenderAnisotropic"
height="16"
label="Anisotropic Filtering (slower when enabled)"
label="Anisotropic Filtering (slower when enabled, requires viewer restart)"
layout="topleft"
left_pad="10"
name="ani"
@ -71,6 +71,18 @@
name="16x"
value="16" />
</combo_box>
<text
type="string"
length="1"
follows="left|top"
height="12"
layout="topleft"
left_pad="10"
name="antialiasing restart"
top_delta="0"
width="188">
(requires viewer restart)
</text>
<spinner
control_name="RenderGamma"
decimal_digits="2"