summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.hgignore5
-rw-r--r--indra/llrender/llrendertarget.cpp26
-rw-r--r--indra/newview/llagent.cpp6
-rw-r--r--indra/newview/llmoveview.cpp3
-rw-r--r--indra/newview/llnavigationbar.cpp10
-rw-r--r--indra/newview/llnavigationbar.h1
-rw-r--r--indra/newview/llsidetray.cpp3
-rw-r--r--indra/newview/llsidetray.h8
-rw-r--r--indra/newview/llviewerwindow.cpp3
-rw-r--r--indra/newview/pipeline.cpp101
-rw-r--r--indra/newview/pipeline.h5
-rw-r--r--indra/newview/skins/default/xui/en/main_view.xml32
12 files changed, 131 insertions, 72 deletions
diff --git a/.hgignore b/.hgignore
index 4d98acf5d9..0f1dd28bcf 100644
--- a/.hgignore
+++ b/.hgignore
@@ -53,3 +53,8 @@ glob:*.cpp.orig
glob:*.cpp.bak
glob:*.h.bak
glob:*.h.orig
+glob:indra/newview/typed_locations.txt
+glob:indra/newview/teleport_history.txt
+glob:indra/newview/search_history.txt
+glob:indra/newview/filters.xml
+glob:indra/newview/avatar_icons_cache.txt
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index f0df3bcf90..bab5cfd56e 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -89,19 +89,6 @@ void LLRenderTarget::setSampleBuffer(LLMultisampleBuffer* buffer)
void LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, BOOL depth, BOOL stencil, LLTexUnit::eTextureType usage, BOOL use_fbo)
{
- // only reallocate if something changed
- if (mResX == resx
- && mResY == resy
- && mUseDepth == depth
- && mStencil == stencil
- && mUsage == usage
- && (mFBO != 0) == ((sUseFBO || use_fbo) && gGLManager.mHasFramebufferObject)
- && mColorFmt == color_fmt)
- {
- // nothing to do
- return;
- }
-
stop_glerror();
mResX = resx;
mResY = resy;
@@ -620,19 +607,6 @@ void LLMultisampleBuffer::allocate(U32 resx, U32 resy, U32 color_fmt, BOOL depth
void LLMultisampleBuffer::allocate(U32 resx, U32 resy, U32 color_fmt, BOOL depth, BOOL stencil, LLTexUnit::eTextureType usage, BOOL use_fbo, U32 samples )
{
- if (mResX == resx
- && mResY == resy
- && mUseDepth == depth
- && mStencil == stencil
- && mUsage == usage
- && (mFBO != 0) == ((sUseFBO || use_fbo) && gGLManager.mHasFramebufferObject)
- && mColorFmt == color_fmt
- && mSamples == samples)
- {
- // nothing to do
- return;
- }
-
stop_glerror();
mResX = resx;
mResY = resy;
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 4dd569e2fa..eb5d172ff7 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -2795,7 +2795,8 @@ void LLAgent::endAnimationUpdateUI()
LLBottomTray::getInstance()->setVisible(TRUE);
- LLSideTray::getInstance()->setVisible(TRUE);
+ LLSideTray::getInstance()->getButtonsPanel()->setVisible(TRUE);
+ LLSideTray::getInstance()->updateSidetrayVisibility();
LLPanelStandStopFlying::getInstance()->setVisible(TRUE);
@@ -2893,7 +2894,8 @@ void LLAgent::endAnimationUpdateUI()
LLBottomTray::getInstance()->setVisible(FALSE);
- LLSideTray::getInstance()->setVisible(FALSE);
+ LLSideTray::getInstance()->getButtonsPanel()->setVisible(FALSE);
+ LLSideTray::getInstance()->updateSidetrayVisibility();
LLPanelStandStopFlying::getInstance()->setVisible(FALSE);
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 93db337053..9e46a4422a 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -586,7 +586,8 @@ void LLPanelStandStopFlying::setVisible(BOOL visible)
updatePosition();
}
- LLPanel::setVisible(visible);
+ //change visibility of parent layout_panel to animate in/out
+ if (getParent()) getParent()->setVisible(visible);
}
BOOL LLPanelStandStopFlying::handleToolTip(S32 x, S32 y, MASK mask)
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index 114d26af8a..c1bd4dd580 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -230,6 +230,16 @@ BOOL LLNavigationBar::postBuild()
return TRUE;
}
+void LLNavigationBar::setVisible(BOOL visible)
+{
+ // change visibility of grandparent layout_panel to animate in and out
+ if (getParent() && getParent()->getParent())
+ {
+ getParent()->getParent()->setVisible(visible);
+ }
+}
+
+
void LLNavigationBar::fillSearchComboBox()
{
if(!mSearchComboBox)
diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h
index 52f5a827e4..6f5175d1ae 100644
--- a/indra/newview/llnavigationbar.h
+++ b/indra/newview/llnavigationbar.h
@@ -56,6 +56,7 @@ public:
/*virtual*/ void draw();
/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL postBuild();
+ /*virtual*/ void setVisible(BOOL visible);
void handleLoginComplete();
void clearHistoryCache();
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 7711f3c733..2f98435b83 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -34,6 +34,7 @@
#include "lltextbox.h"
+#include "llagent.h"
#include "llbottomtray.h"
#include "llsidetray.h"
#include "llviewerwindow.h"
@@ -700,7 +701,7 @@ void LLSideTray::updateSidetrayVisibility()
// set visibility of parent container based on collapsed state
if (getParent())
{
- getParent()->setVisible(!mCollapsed);
+ getParent()->setVisible(!mCollapsed && !gAgent.cameraMouselook());
}
}
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index 54652c1108..7321574681 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -120,7 +120,7 @@ public:
void setVisible(BOOL visible)
{
- LLPanel::setVisible(visible);
+ if (getParent()) getParent()->setVisible(visible);
}
LLPanel* getButtonsPanel() { return mButtonsPanel; }
@@ -141,6 +141,7 @@ public:
void processTriState ();
+ void updateSidetrayVisibility();
protected:
LLSideTrayTab* getTab (const std::string& name);
@@ -153,10 +154,6 @@ protected:
void toggleTabButton (LLSideTrayTab* tab);
- void updateSidetrayVisibility();
-
-
-
private:
// Implementation of LLDestroyClass<LLSideTray>
static void destroyClass()
@@ -166,7 +163,6 @@ private:
LLSideTray::getInstance()->setEnabled(FALSE);
}
-
private:
LLPanel* mButtonsPanel;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index db66faef81..29d40d073c 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1573,7 +1573,8 @@ void LLViewerWindow::initWorldUI()
LLPanel* side_tray_container = getRootView()->getChild<LLPanel>("side_tray_container");
LLSideTray* sidetrayp = LLSideTray::getInstance();
sidetrayp->setShape(side_tray_container->getLocalRect());
- sidetrayp->setFollowsAll();
+ // don't follow right edge to avoid spurious resizes, since we are using a fixed width layout
+ sidetrayp->setFollows(FOLLOWS_LEFT|FOLLOWS_TOP|FOLLOWS_BOTTOM);
side_tray_container->addChild(sidetrayp);
side_tray_container->setVisible(FALSE);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 507c726e02..5aad87630d 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -344,7 +344,12 @@ LLPipeline::LLPipeline() :
mWLSkyPool(NULL),
mLightMask(0),
mLightMovingMask(0),
- mLightingDetail(0)
+ mLightingDetail(0),
+ mScreenWidth(0),
+ mScreenHeight(0),
+ mViewportWidth(0),
+ mViewportHeight(0)
+
{
mNoiseMap = 0;
mTrueNoiseMap = 0;
@@ -518,13 +523,29 @@ void LLPipeline::resizeScreenTexture()
GLuint view_height = gViewerWindow->getWorldViewHeightRaw();
allocateScreenBuffer(resX, resY, view_width, view_height);
-
- llinfos << "RESIZED SCREEN TEXTURE: " << resX << "x" << resY << llendl;
}
}
void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 viewport_width, U32 viewport_height)
{
+ bool screen_size_changed = resX != mScreenWidth || resY != mScreenHeight;
+ bool viewport_size_changed = viewport_width != mViewportWidth || viewport_height != mViewportHeight;
+
+ if (!screen_size_changed
+ && !viewport_size_changed)
+ {
+ // nothing to do
+ return;
+ }
+
+ // remember these dimensions
+ mScreenWidth = resX;
+ mScreenHeight = resY;
+ mViewportWidth = viewport_width;
+ mViewportHeight = viewport_height;
+
+ llinfos << "RESIZED SCREEN TEXTURE: " << resX << "x" << resY << llendl;
+
U32 samples = gSavedSettings.getU32("RenderFSAASamples");
U32 res_mod = gSavedSettings.getU32("RenderResolutionDivisor");
@@ -534,7 +555,8 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 viewport_width, U3
resY /= res_mod;
}
- if (gSavedSettings.getBOOL("RenderUIBuffer"))
+ if (gSavedSettings.getBOOL("RenderUIBuffer")
+ && screen_size_changed)
{
mUIScreen.allocate(resX,resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
}
@@ -542,25 +564,39 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 viewport_width, U3
if (LLPipeline::sRenderDeferred)
{
//allocate deferred rendering color buffers
- mDeferredScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
- mDeferredDepth.allocate(resX, resY, 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
+ if (screen_size_changed)
+ {
+ mDeferredScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
+ mDeferredDepth.allocate(resX, resY, 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
+ addDeferredAttachments(mDeferredScreen);
+ }
+ // always set viewport to desired size, since allocate resets the viewport
mDeferredScreen.setViewport(viewport_width, viewport_height);
mDeferredDepth.setViewport(viewport_width, viewport_height);
- addDeferredAttachments(mDeferredScreen);
- mScreen.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
- mEdgeMap.allocate(resX, resY, GL_ALPHA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
+
+ if (screen_size_changed)
+ {
+ mScreen.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
+ mEdgeMap.allocate(resX, resY, GL_ALPHA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
+ }
mScreen.setViewport(viewport_width, viewport_height);
mEdgeMap.setViewport(viewport_width, viewport_height);
for (U32 i = 0; i < 3; i++)
{
- mDeferredLight[i].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE);
+ if (screen_size_changed)
+ {
+ mDeferredLight[i].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE);
+ }
mDeferredLight[i].setViewport(viewport_width, viewport_height);
}
for (U32 i = 0; i < 2; i++)
{
- mGIMapPost[i].allocate(resX,resY, GL_RGB, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE);
+ if (screen_size_changed)
+ {
+ mGIMapPost[i].allocate(resX,resY, GL_RGB, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE);
+ }
mGIMapPost[i].setViewport(viewport_width, viewport_height);
}
@@ -568,7 +604,10 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 viewport_width, U3
for (U32 i = 0; i < 4; i++)
{
- mShadow[i].allocate(U32(resX*scale),U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE);
+ if (screen_size_changed)
+ {
+ mShadow[i].allocate(U32(resX*scale),U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE);
+ }
mShadow[i].setViewport(viewport_width, viewport_height);
}
@@ -578,7 +617,10 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 viewport_width, U3
for (U32 i = 4; i < 6; i++)
{
- mShadow[i].allocate(width, height, 0, TRUE, FALSE);
+ if (screen_size_changed)
+ {
+ mShadow[i].allocate(width, height, 0, TRUE, FALSE);
+ }
mShadow[i].setViewport(viewport_width, viewport_height);
}
@@ -586,32 +628,41 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 viewport_width, U3
width = nhpo2(resX)/2;
height = nhpo2(resY)/2;
- mLuminanceMap.allocate(width,height, GL_RGBA, FALSE, FALSE);
+ if (screen_size_changed)
+ {
+ mLuminanceMap.allocate(width,height, GL_RGBA, FALSE, FALSE);
+ }
mLuminanceMap.setViewport(viewport_width, viewport_height);
}
else
{
- mScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
+ if (screen_size_changed)
+ {
+ mScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
+ }
mScreen.setViewport(viewport_width, viewport_height);
}
if (gGLManager.mHasFramebufferMultisample && samples > 1)
{
- mSampleBuffer.allocate(resX,resY,GL_RGBA,TRUE,TRUE,LLTexUnit::TT_RECT_TEXTURE,FALSE,samples);
- mSampleBuffer.setViewport(viewport_width, viewport_height);
- mScreen.setSampleBuffer(&mSampleBuffer);
-
- if (LLPipeline::sRenderDeferred)
+ if (screen_size_changed)
{
- addDeferredAttachments(mSampleBuffer);
- mDeferredScreen.setSampleBuffer(&mSampleBuffer);
+ mSampleBuffer.allocate(resX,resY,GL_RGBA,TRUE,TRUE,LLTexUnit::TT_RECT_TEXTURE,FALSE,samples);
+ if (LLPipeline::sRenderDeferred)
+ {
+ addDeferredAttachments(mSampleBuffer);
+ mDeferredScreen.setSampleBuffer(&mSampleBuffer);
+ }
}
+ mSampleBuffer.setViewport(viewport_width, viewport_height);
+ mScreen.setSampleBuffer(&mSampleBuffer);
stop_glerror();
}
- if (LLPipeline::sRenderDeferred)
+ if (LLPipeline::sRenderDeferred
+ && screen_size_changed)
{ //share depth buffer between deferred targets
mDeferredScreen.shareDepthBuffer(mScreen);
for (U32 i = 0; i < 3; i++)
@@ -726,6 +777,10 @@ void LLPipeline::createGLBuffers()
mGlow[i].allocate(512,glow_res,GL_RGBA,FALSE,FALSE);
}
+ // force reallocation of buffers by clearing known dimensions
+ mScreenWidth = 0;
+ mScreenHeight = 0;
+
allocateScreenBuffer(resX,resY, viewport_width, viewport_height);
}
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 9193e19bb1..11b7b55f20 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -467,6 +467,11 @@ public:
static F32 sMinRenderSize;
//screen texture
+ U32 mScreenWidth;
+ U32 mScreenHeight;
+ U32 mViewportWidth;
+ U32 mViewportHeight;
+
LLRenderTarget mScreen;
LLRenderTarget mUIScreen;
LLRenderTarget mDeferredScreen;
diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml
index 14a4949df7..3bf7f50a2c 100644
--- a/indra/newview/skins/default/xui/en/main_view.xml
+++ b/indra/newview/skins/default/xui/en/main_view.xml
@@ -15,19 +15,19 @@
orientation="vertical"
top="0">
<layout_panel auto_resize="false"
- min_height="19"
+ height="84"
mouse_opaque="false"
- name="status_bar_container"
- height="19"
+ name="nav_and_status_bar_region"
width="1024"
- visible="false"/>
- <layout_panel auto_resize="false"
- height="65"
- mouse_opaque="false"
- name="nav_bar_container"
- width="1024"
- visible="false"/>
- <panel auto_resize="true"
+ visible="false">
+ <panel follows="left|right|bottom"
+ left="0"
+ name="nav_bar_container"
+ right="1024"
+ top="19"
+ height="65"/>
+ </layout_panel>
+ <layout_panel auto_resize="true"
follows="all"
height="500"
layout="topleft"
@@ -124,8 +124,16 @@
height="500"
name="DebugView"
width="1024"/>
- </panel>
+ </layout_panel>
</layout_stack>
+ <panel mouse_opaque="false"
+ follows="left|right|top"
+ name="status_bar_container"
+ height="19"
+ left="0"
+ top="0"
+ width="1024"
+ visible="false"/>
<notify_box_view top="0"
follows="all"
height="768"