summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llnetmap.cpp4
-rw-r--r--indra/newview/llsidetray.cpp1
-rw-r--r--indra/newview/llviewerwindow.cpp31
-rw-r--r--indra/newview/pipeline.cpp21
-rw-r--r--indra/newview/pipeline.h2
5 files changed, 38 insertions, 21 deletions
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 4286582cdc..6145588df2 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -155,11 +155,9 @@ void LLNetMap::draw()
F32 rotation = 0;
{
- LLGLEnable scissor(GL_SCISSOR_TEST);
-
+ LLLocalClipRect clip(getLocalRect());
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- LLLocalClipRect clip(getLocalRect());
glMatrixMode(GL_MODELVIEW);
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 3d0b4de88a..34b3b00ff2 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -101,6 +101,7 @@ LLSideTray* LLSideTray::getInstance()
if (!sInstance)
{
sInstance = LLUICtrlFactory::createFromFile<LLSideTray>("panel_side_tray.xml",NULL, LLRootView::child_registry_t::instance());
+ sInstance->setXMLFilename("panel_side_tray.xml");
}
return sInstance;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index d69cc5999c..1054223dcf 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2302,13 +2302,13 @@ void LLViewerWindow::moveCursorToCenter()
// Hover handlers
//
-void append_xui_tooltip(LLView* viewp, std::string& tool_tip_msg)
+void append_xui_tooltip(LLView* viewp, LLToolTip::Params& params)
{
if (viewp)
{
- if (!tool_tip_msg.empty())
+ if (!params.styled_message().empty())
{
- tool_tip_msg.append("\n---------\n");
+ params.styled_message.add().text("\n---------\n");
}
LLView::root_to_view_iterator_t end_tooltip_it = viewp->endRootToView();
// NOTE: we skip "root" since it is assumed
@@ -2318,15 +2318,16 @@ void append_xui_tooltip(LLView* viewp, std::string& tool_tip_msg)
{
LLView* viewp = *tooltip_it;
- tool_tip_msg.append(viewp->getName());
+ params.styled_message.add().text(viewp->getName());
+
LLPanel* panelp = dynamic_cast<LLPanel*>(viewp);
if (panelp && !panelp->getXMLFilename().empty())
{
- tool_tip_msg.append("(");
- tool_tip_msg.append(panelp->getXMLFilename());
- tool_tip_msg.append(")");
+ params.styled_message.add()
+ .text("(" + panelp->getXMLFilename() + ")")
+ .style.color(LLColor4(0.7f, 0.7f, 1.f, 1.f));
}
- tool_tip_msg.append("/");
+ params.styled_message.add().text("/");
}
}
}
@@ -2567,6 +2568,8 @@ void LLViewerWindow::updateUI()
if (gSavedSettings.getBOOL("DebugShowXUINames"))
{
+ LLToolTip::Params params;
+
LLView* tooltip_view = mRootView;
LLView::tree_iterator_t end_it = mRootView->endTreeDFS();
for (LLView::tree_iterator_t it = mRootView->beginTreeDFS(); it != end_it; ++it)
@@ -2599,20 +2602,20 @@ void LLViewerWindow::updateUI()
// NOTE: this emulates visiting only the leaf nodes that meet our criteria
if (!viewp->hasAncestor(tooltip_view))
{
- append_xui_tooltip(tooltip_view, tool_tip_msg);
+ append_xui_tooltip(tooltip_view, params);
screen_sticky_rect.intersectWith(tooltip_view->calcScreenRect());
}
tooltip_view = viewp;
}
}
- append_xui_tooltip(tooltip_view, tool_tip_msg);
+ append_xui_tooltip(tooltip_view, params);
screen_sticky_rect.intersectWith(tooltip_view->calcScreenRect());
- LLToolTipMgr::instance().show(LLToolTip::Params()
- .message(tool_tip_msg)
- .sticky_rect(screen_sticky_rect)
- .max_width(400));
+ params.sticky_rect = screen_sticky_rect;
+ params.max_width = 400;
+
+ LLToolTipMgr::instance().show(params);
}
// if there is a mouse captor, nothing else gets a tooltip
else if (mouse_captor)
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 1129e9ffd1..73a91bbbc0 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -514,14 +514,16 @@ void LLPipeline::resizeScreenTexture()
{
GLuint resX = gViewerWindow->getWorldViewWidthRaw();
GLuint resY = gViewerWindow->getWorldViewHeightRaw();
+ GLuint view_width = gViewerWindow->getWorldViewWidth();
+ GLuint view_height = gViewerWindow->getWorldViewHeight();
- allocateScreenBuffer(resX,resY);
+ allocateScreenBuffer(resX, resY, view_width, view_height);
llinfos << "RESIZED SCREEN TEXTURE: " << resX << "x" << resY << llendl;
}
}
-void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
+void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 viewport_width, U32 viewport_height)
{
U32 samples = gSavedSettings.getU32("RenderFSAASamples");
@@ -542,18 +544,24 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
//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);
+ 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);
+ 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);
+ 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);
+ mGIMapPost[i].setViewport(viewport_width, viewport_height);
}
F32 scale = gSavedSettings.getF32("RenderShadowResolutionScale");
@@ -561,6 +569,7 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
for (U32 i = 0; i < 4; i++)
{
mShadow[i].allocate(U32(resX*scale),U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE);
+ mShadow[i].setViewport(viewport_width, viewport_height);
}
@@ -570,6 +579,7 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
for (U32 i = 4; i < 6; i++)
{
mShadow[i].allocate(width, height, 0, TRUE, FALSE);
+ mShadow[i].setViewport(viewport_width, viewport_height);
}
@@ -577,16 +587,19 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
width = nhpo2(resX)/2;
height = nhpo2(resY)/2;
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);
+ 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)
@@ -700,6 +713,8 @@ void LLPipeline::createGLBuffers()
GLuint resX = gViewerWindow->getWorldViewWidthRaw();
GLuint resY = gViewerWindow->getWorldViewHeightRaw();
+ GLuint viewport_width = gViewerWindow->getWorldViewWidth();
+ GLuint viewport_height = gViewerWindow->getWorldViewHeight();
if (LLPipeline::sRenderGlow)
{ //screen space glow buffers
@@ -711,7 +726,7 @@ void LLPipeline::createGLBuffers()
mGlow[i].allocate(512,glow_res,GL_RGBA,FALSE,FALSE);
}
- allocateScreenBuffer(resX,resY);
+ allocateScreenBuffer(resX,resY, viewport_width, viewport_height);
}
if (sRenderDeferred)
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index ce50a37405..9193e19bb1 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -111,7 +111,7 @@ public:
void resizeScreenTexture();
void releaseGLBuffers();
void createGLBuffers();
- void allocateScreenBuffer(U32 resX, U32 resY);
+ void allocateScreenBuffer(U32 resX, U32 resY, U32 viewport_width, U32 viewport_height);
void resetVertexBuffers(LLDrawable* drawable);
void setUseVBO(BOOL use_vbo);