void LLFloaterHardwareSettings::apply()
{
    // Anisotropic rendering
    BOOL old_anisotropic = LLImageGL::sGlobalUseAnisotropic;
    LLImageGL::sGlobalUseAnisotropic = childGetValue("ani");

    U32 fsaa = (U32) childGetValue("fsaa").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(window->getFullscreen(),
                                             size,
                                             gSavedSettings.getBOOL("DisableVerticalSync"),
                                             logged_in);
    }
    else if (old_anisotropic != LLImageGL::sGlobalUseAnisotropic)
    {
        gViewerWindow->restartDisplay(logged_in);
    }

    refresh();
}
Пример #2
0
void LLPanelDisplay::apply()
{
	U32 fsaa_value = childGetValue("fsaa").asInteger();
	bool apply_fsaa_change = !gSavedSettings.getBOOL("RenderUseFBO") && (mFSAASamples != fsaa_value);
	gSavedSettings.setU32("RenderFSAASamples", fsaa_value);

	applyResolution();
	
	// Only set window size if we're not in fullscreen mode
	if (mCtrlWindowed->get())
	{
		applyWindowSize();
	}

	// 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(apply_fsaa_change)
	{
		bool logged_in = (LLStartUp::getStartupState() >= STATE_STARTED);
		LLWindow* window = gViewerWindow->getWindow();
		LLCoordScreen size;
		window->getSize(&size);
		gViewerWindow->changeDisplaySettings(window->getFullscreen(),
												size,
												gSavedSettings.getBOOL("DisableVerticalSync"),
												logged_in);
	}
}
Пример #3
0
void LLPanelDisplay::apply()
{
	U32 fsaa_value = childGetValue("fsaa").asInteger();
	S32 vsync_value = childGetValue("vsync").asInteger();
	bool fbo_value = childGetValue("fbo").asBoolean();

	LLWindow* window = gViewerWindow->getWindow();

	if(vsync_value == -1 && !gGLManager.mHasAdaptiveVsync)
		vsync_value = 0;

	bool apply_fsaa_change = fbo_value ? false : (mFSAASamples != fsaa_value);

	if(!apply_fsaa_change && (bool)mUseFBO != fbo_value)
	{
		apply_fsaa_change = fsaa_value != 0 || mFSAASamples != 0 ;
	}

	bool apply_vsync_change = vsync_value != mVsyncMode;

	gSavedSettings.setU32("RenderFSAASamples", fsaa_value);
	gSavedSettings.setS32("SHRenderVsyncMode", vsync_value);

	applyResolution();

	// Only set window size if we're not in fullscreen mode
	if (mCtrlWindowed->get())
	{
		applyWindowSize();
	}

	// 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(apply_fsaa_change || apply_vsync_change)
	{
		bool logged_in = (LLStartUp::getStartupState() >= STATE_STARTED);
		LLCoordScreen size;
		window->getSize(&size);
		LLGLState::checkStates();
		LLGLState::checkTextureChannels();
		gViewerWindow->changeDisplaySettings(window->getFullscreen(),
												size,
												vsync_value,
												logged_in);
		LLGLState::checkStates();
		LLGLState::checkTextureChannels();
	}
}
Пример #4
0
void LLFloaterHardwareSettings::apply() 
{
	//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()))
	{
		BOOL logged_in = (LLStartUp::getStartupState() >= STATE_STARTED);
		LLWindow* window = gViewerWindow->getWindow();
		LLCoordScreen size;
		window->getSize(&size);
		gViewerWindow->changeDisplaySettings(window->getFullscreen(), 
															size,
															gSavedSettings.getBOOL("DisableVerticalSync"),
															logged_in);
	}

	refresh();
}