当前位置: 首页>>代码示例>>C++>>正文


C++ LLWindow::getSize方法代码示例

本文整理汇总了C++中LLWindow::getSize方法的典型用法代码示例。如果您正苦于以下问题:C++ LLWindow::getSize方法的具体用法?C++ LLWindow::getSize怎么用?C++ LLWindow::getSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLWindow的用法示例。


在下文中一共展示了LLWindow::getSize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: apply

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();
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:29,代码来源:llfloaterhardwaresettings.cpp

示例2: apply

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);
	}
}
开发者ID:samiam123,项目名称:VoodooNxg,代码行数:29,代码来源:llpaneldisplay.cpp

示例3: apply

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();
	}
}
开发者ID:sines,项目名称:SingularityViewer,代码行数:49,代码来源:llpaneldisplay.cpp

示例4: apply

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();
}
开发者ID:Kiera,项目名称:Crow,代码行数:18,代码来源:llfloaterhardwaresettings.cpp


注:本文中的LLWindow::getSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。