summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Nelson <richard@lindenlab.com>2009-07-09 01:05:44 +0000
committerRichard Nelson <richard@lindenlab.com>2009-07-09 01:05:44 +0000
commit3c956af81c88faa78d1ce4bd6ce6e361c9eea665 (patch)
tree640b41fb9035438c12d7916f00ec0102e09c9d3f
parent394b28ce77e5e51c41c1d3d9ca9896812f404810 (diff)
DEV-35121 when taking a snapshot without UI, use full window to render world. This solves black bars while logging in problem
merge -r 126570 skinning-15 viewer-2.0.0-3 reviewed by Austin
-rw-r--r--indra/newview/llviewerwindow.cpp33
-rw-r--r--indra/newview/llviewerwindow.h2
2 files changed, 21 insertions, 14 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index ae8717971f..27311cff42 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2916,27 +2916,31 @@ void LLViewerWindow::updateKeyboardFocus()
}
-void LLViewerWindow::updateWorldViewRect()
+void LLViewerWindow::updateWorldViewRect(bool use_full_window)
{
if (!LLSideTray::instanceCreated()) return;
+ // start off using whole window to render world
LLRect new_world_rect = mWindowRect;
- // pull in right side of world view based on sidetray
- LLSideTray* sidetray = LLSideTray::getInstance();
- if (sidetray->getVisible())
+ if (use_full_window == false)
{
- new_world_rect.mRight -= llround((F32)sidetray->getTrayWidth() * mDisplayScale.mV[VX]);
- }
+ // pull in right side of world view based on sidetray
+ LLSideTray* sidetray = LLSideTray::getInstance();
+ if (sidetray->getVisible())
+ {
+ new_world_rect.mRight -= llround((F32)sidetray->getTrayWidth() * mDisplayScale.mV[VX]);
+ }
- // push top of world view below nav bar
- if (LLNavigationBar::getInstance()->getVisible())
- {
- LLNavigationBar* barp = LLNavigationBar::getInstance();
- LLRect nav_bar_rect;
- if(barp->localRectToOtherView(barp->getLocalRect(), &nav_bar_rect, mRootView))
+ // push top of world view below nav bar
+ if (LLNavigationBar::getInstance()->getVisible())
{
- new_world_rect.mTop = llround((F32)LLNavigationBar::getInstance()->getRect().mBottom * mDisplayScale.mV[VY]);
+ LLNavigationBar* barp = LLNavigationBar::getInstance();
+ LLRect nav_bar_rect;
+ if(barp->localRectToOtherView(barp->getLocalRect(), &nav_bar_rect, mRootView))
+ {
+ new_world_rect.mTop = llround((F32)LLNavigationBar::getInstance()->getRect().mBottom * mDisplayScale.mV[VY]);
+ }
}
}
@@ -3925,6 +3929,9 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
// PRE SNAPSHOT
gDisplaySwapBuffers = FALSE;
+ // if not showing ui, use full window to render world view
+ updateWorldViewRect(!show_ui);
+
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
setCursor(UI_CURSOR_WAIT);
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index eae1bf0343..84db40636d 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -278,7 +278,7 @@ public:
void updateKeyboardFocus();
void updatePicking(S32 x, S32 y, MASK mask);
- void updateWorldViewRect();
+ void updateWorldViewRect(bool use_full_window=false);
BOOL handleKey(KEY key, MASK mask);
void handleScrollWheel (S32 clicks);