summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp61
1 files changed, 29 insertions, 32 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 670a3b2939..ef24bcf598 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2007,7 +2007,7 @@ LLViewerWindow::LLViewerWindow(const Params& p)
LL_DEBUGS("Window") << "Loading feature tables." << LL_ENDL;
// Initialize OpenGL Renderer
- LLVertexBuffer::initClass(mWindow);
+ LLVertexBuffer::initClass(mWindow, gSavedSettings.getU32("MPVertexBufferMode"));
LL_INFOS("RenderInit") << "LLVertexBuffer initialization done." << LL_ENDL ;
if (!gGL.init(true))
{
@@ -2060,6 +2060,8 @@ LLViewerWindow::LLViewerWindow(const Params& p)
mDebugText = new LLDebugText(this);
mWorldViewRectScaled = calcScaledRect(mWorldViewRectRaw, mDisplayScale);
+
+ mWindow->toggleVSync(gSavedSettings.getBOOL("RenderVSyncEnabled"));
}
std::string LLViewerWindow::getLastSnapshotDir()
@@ -2322,36 +2324,23 @@ void LLViewerWindow::initWorldUI()
gToolBarView->setVisible(true);
}
- if (!gNonInteractive)
+ // Don't preload cef instances on low end hardware
+ const F32Gigabytes MIN_PHYSICAL_MEMORY(8);
+ F32Gigabytes physical_mem = LLMemory::getMaxMemKB();
+ if (physical_mem <= 0)
{
- LLMediaCtrl* destinations = LLFloaterReg::getInstance("destinations")->getChild<LLMediaCtrl>("destination_guide_contents");
- if (destinations)
- {
- destinations->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
- std::string url = gSavedSettings.getString("DestinationGuideURL");
- url = LLWeb::expandURLSubstitutions(url, LLSD());
- destinations->navigateTo(url, HTTP_CONTENT_TEXT_HTML);
- }
- LLMediaCtrl* avatar_welcome_pack = LLFloaterReg::getInstance("avatar_welcome_pack")->findChild<LLMediaCtrl>("avatar_picker_contents");
- if (avatar_welcome_pack)
- {
- avatar_welcome_pack->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
- std::string url = gSavedSettings.getString("AvatarWelcomePack");
- url = LLWeb::expandURLSubstitutions(url, LLSD());
- avatar_welcome_pack->navigateTo(url, HTTP_CONTENT_TEXT_HTML);
- }
- LLMediaCtrl* search = LLFloaterReg::getInstance("search")->findChild<LLMediaCtrl>("search_contents");
- if (search)
- {
- search->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
- }
- LLMediaCtrl* marketplace = LLFloaterReg::getInstance("marketplace")->getChild<LLMediaCtrl>("marketplace_contents");
- if (marketplace)
- {
- marketplace->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
- std::string url = gSavedSettings.getString("MarketplaceURL");
- marketplace->navigateTo(url, HTTP_CONTENT_TEXT_HTML);
- }
+ LLMemory::updateMemoryInfo();
+ physical_mem = LLMemory::getMaxMemKB();
+ }
+
+ if (!gNonInteractive && physical_mem > MIN_PHYSICAL_MEMORY)
+ {
+ LL_INFOS() << "Preloading cef instances" << LL_ENDL;
+
+ LLFloaterReg::getInstance("destinations");
+ LLFloaterReg::getInstance("avatar_welcome_pack");
+ LLFloaterReg::getInstance("search");
+ LLFloaterReg::getInstance("marketplace");
}
}
@@ -3923,7 +3912,7 @@ void LLViewerWindow::updateLayout()
void LLViewerWindow::updateMouseDelta()
{
-#if LL_WINDOWS
+#if LL_WINDOWS && !LL_SDL
LLCoordCommon delta;
mWindow->getCursorDelta(&delta);
S32 dx = delta.mX;
@@ -4908,13 +4897,21 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save
auto err = 0;
auto extension("." + image->getExtension());
auto now = LLDate::now();
+ static LLCachedControl<bool> snapshot_timestamp(gSavedSettings, "SnapshotTimestamp", true);
do
{
filepath = sSnapshotDir;
filepath += gDirUtilp->getDirDelimiter();
filepath += sSnapshotBaseName;
+ if (snapshot_timestamp)
+ {
filepath += now.toLocalDateString("_%Y-%m-%d_%H%M%S");
filepath += llformat("%.2d", i);
+ }
+ else if (is_snapshot_name_loc_set)
+ {
+ filepath += llformat("_%.3d", i);
+ }
filepath += extension;
llstat stat_info;
@@ -5256,7 +5253,7 @@ bool LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
glReadPixels(
subimage_x_offset, out_y + subimage_y_offset,
read_width, 1,
- GL_DEPTH_COMPONENT, GL_FLOAT,
+ GL_DEPTH_COMPONENT, GL_UNSIGNED_INT,
depth_line_buffer->getData()// current output pixel is beginning of buffer...
);