本文整理汇总了C++中LLWindow类的典型用法代码示例。如果您正苦于以下问题:C++ LLWindow类的具体用法?C++ LLWindow怎么用?C++ LLWindow使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LLWindow类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: childGetValue
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: childGetValue
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: convertFromCommon
void LL_COORD_TYPE_SCREEN::convertFromCommon(const LLCoordCommon& from)
{
LLCoordScreen& self = LLCoordScreen::getTypedCoords(*this);
LLWindow* windowp = &(*LLWindow::beginInstances());
LLCoordGL from_gl(from);
windowp->convertCoords(from_gl, &self);
}
示例4: convertToCommon
LLCoordCommon LL_COORD_TYPE_SCREEN::convertToCommon() const
{
const LLCoordScreen& self = LLCoordScreen::getTypedCoords(*this);
LLWindow* windowp = &(*LLWindow::beginInstances());
LLCoordGL out;
windowp->convertCoords(self, &out);
return out.convert();
}
示例5: childGetValue
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();
}
}
示例6: 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();
}
示例7: LL_WARNS_ONCE
bool LLLoginHandler::handle(const LLSD& tokens,
const LLSD& query_map,
LLMediaCtrl* web)
{
// do nothing if we are already logged in
if (LLLoginInstance::getInstance()->authSuccess())
{
LL_WARNS_ONCE("SLURL") << "Already logged in! Ignoring login SLapp." << LL_ENDL;
return true;
}
if (tokens.size() == 1
&& tokens[0].asString() == "show")
{
// We're using reg-in-client, so show the XUI login widgets
LLPanelLogin::showLoginWidgets();
return true;
}
if (tokens.size() == 1
&& tokens[0].asString() == "reg")
{
LLWindow* window = gViewerWindow->getWindow();
window->incBusyCount();
window->setCursor(UI_CURSOR_ARROW);
// Do this first, as it may be slow and we want to keep something
// on the user's screen as long as possible
LLWeb::loadURLExternal( "http://join.eniac15.lindenlab.com/" );
window->decBusyCount();
window->setCursor(UI_CURSOR_ARROW);
// Then hide the window
window->minimize();
return true;
}
// Make sure window is visible
LLWindow* window = gViewerWindow->getWindow();
if (window->getMinimized())
{
window->restore();
}
parse(query_map);
//if we haven't initialized stuff yet, this is
//coming in from the GURL handler, just parse
if (STATE_FIRST == LLStartUp::getStartupState())
{
return true;
}
if (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) //on splash page
{
// as the login page may change from grid to grid, as well as
// things like username/password/etc, we simply refresh the
// login page to make sure everything is set up correctly
LLPanelLogin::loadLoginPage();
LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
}
return true;
}