summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llplugin/llpluginmessagepipe.cpp51
-rw-r--r--indra/llplugin/llpluginmessagepipe.h1
-rw-r--r--indra/llprimitive/lltextureanim.cpp4
-rw-r--r--indra/llrender/llshadermgr.cpp54
-rw-r--r--indra/llui/llscrolllistctrl.cpp8
-rw-r--r--indra/llui/llscrolllistctrl.h2
-rw-r--r--indra/newview/app_settings/settings.xml12
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl13
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl13
-rw-r--r--indra/newview/featuretable_mac.txt4
-rw-r--r--indra/newview/lldebugview.cpp39
-rw-r--r--indra/newview/lldebugview.h6
-rw-r--r--indra/newview/lldrawpool.h1
-rw-r--r--indra/newview/lldrawpooltree.cpp154
-rw-r--r--indra/newview/lldrawpooltree.h3
-rw-r--r--indra/newview/llfloaterwebcontent.cpp40
-rw-r--r--indra/newview/llfloaterwebcontent.h6
-rw-r--r--indra/newview/llnearbychatbar.cpp17
-rw-r--r--indra/newview/llnearbychatbar.h7
-rw-r--r--indra/newview/llnearbychathandler.cpp11
-rw-r--r--indra/newview/llscreenchannel.cpp42
-rw-r--r--indra/newview/llscreenchannel.h7
-rw-r--r--indra/newview/llsidepaneltaskinfo.cpp159
-rw-r--r--indra/newview/llsidepaneltaskinfo.h40
-rw-r--r--indra/newview/llstatusbar.cpp5
-rw-r--r--indra/newview/llstatusbar.h3
-rw-r--r--indra/newview/llviewercontrol.cpp1
-rw-r--r--indra/newview/llviewerdisplay.cpp4
-rw-r--r--indra/newview/llviewershadermgr.cpp1
-rw-r--r--indra/newview/llvoavatar.cpp8
-rw-r--r--indra/newview/llvoavatar.h3
-rw-r--r--indra/newview/llvotree.cpp96
-rw-r--r--indra/newview/llvotree.h1
-rw-r--r--indra/newview/llvovolume.cpp26
-rw-r--r--indra/newview/pipeline.cpp122
-rw-r--r--indra/newview/pipeline.h4
38 files changed, 520 insertions, 455 deletions
diff --git a/indra/llplugin/llpluginmessagepipe.cpp b/indra/llplugin/llpluginmessagepipe.cpp
index 8d13e38ad5..091e93ea4b 100644
--- a/indra/llplugin/llpluginmessagepipe.cpp
+++ b/indra/llplugin/llpluginmessagepipe.cpp
@@ -94,10 +94,10 @@ void LLPluginMessagePipeOwner::killMessagePipe(void)
LLPluginMessagePipe::LLPluginMessagePipe(LLPluginMessagePipeOwner *owner, LLSocket::ptr_t socket):
mInputMutex(gAPRPoolp),
mOutputMutex(gAPRPoolp),
+ mOutputStartIndex(0),
mOwner(owner),
mSocket(socket)
{
-
mOwner->setMessagePipe(this);
}
@@ -113,6 +113,14 @@ bool LLPluginMessagePipe::addMessage(const std::string &message)
{
// queue the message for later output
LLMutexLock lock(&mOutputMutex);
+
+ // If we're starting to use up too much memory, clear
+ if (mOutputStartIndex > 1024 * 1024)
+ {
+ mOutput = mOutput.substr(mOutputStartIndex);
+ mOutputStartIndex = 0;
+ }
+
mOutput += message;
mOutput += MESSAGE_DELIMITER; // message separator
@@ -165,35 +173,44 @@ bool LLPluginMessagePipe::pumpOutput()
if(mSocket)
{
apr_status_t status;
- apr_size_t size;
+ apr_size_t in_size, out_size;
LLMutexLock lock(&mOutputMutex);
- if(!mOutput.empty())
+
+ const char * output_data = &(mOutput.data()[mOutputStartIndex]);
+ if(*output_data != '\0')
{
// write any outgoing messages
- size = (apr_size_t)mOutput.size();
+ in_size = (apr_size_t) (mOutput.size() - mOutputStartIndex);
+ out_size = in_size;
setSocketTimeout(0);
// LL_INFOS("Plugin") << "before apr_socket_send, size = " << size << LL_ENDL;
- status = apr_socket_send(
- mSocket->getSocket(),
- (const char*)mOutput.data(),
- &size);
+ status = apr_socket_send(mSocket->getSocket(),
+ output_data,
+ &out_size);
// LL_INFOS("Plugin") << "after apr_socket_send, size = " << size << LL_ENDL;
- if(status == APR_SUCCESS)
+ if((status == APR_SUCCESS) || APR_STATUS_IS_EAGAIN(status))
{
- // success
- mOutput = mOutput.substr(size);
- }
- else if(APR_STATUS_IS_EAGAIN(status))
- {
- // Socket buffer is full...
- // remove the written part from the buffer and try again later.
- mOutput = mOutput.substr(size);
+ // Success or Socket buffer is full...
+
+ // If we've pumped the entire string, clear it
+ if (out_size == in_size)
+ {
+ mOutputStartIndex = 0;
+ mOutput.clear();
+ }
+ else
+ {
+ llassert(in_size > out_size);
+
+ // Remove the written part from the buffer and try again later.
+ mOutputStartIndex += out_size;
+ }
}
else if(APR_STATUS_IS_EOF(status))
{
diff --git a/indra/llplugin/llpluginmessagepipe.h b/indra/llplugin/llpluginmessagepipe.h
index beb942c0fe..059943cc90 100644
--- a/indra/llplugin/llpluginmessagepipe.h
+++ b/indra/llplugin/llpluginmessagepipe.h
@@ -86,6 +86,7 @@ protected:
std::string mInput;
LLMutex mOutputMutex;
std::string mOutput;
+ std::string::size_type mOutputStartIndex;
LLPluginMessagePipeOwner *mOwner;
LLSocket::ptr_t mSocket;
diff --git a/indra/llprimitive/lltextureanim.cpp b/indra/llprimitive/lltextureanim.cpp
index 398af4e6e8..185a3f69c0 100644
--- a/indra/llprimitive/lltextureanim.cpp
+++ b/indra/llprimitive/lltextureanim.cpp
@@ -168,8 +168,8 @@ void LLTextureAnim::unpackTAMessage(LLDataPacker &dp)
mMode = data[0];
mFace = data[1];
- mSizeX = llmax((U8)1, data[2]);
- mSizeY = llmax((U8)1, data[3]);
+ mSizeX = data[2];
+ mSizeY = data[3];
htonmemcpy(&mStart, data + 4, MVT_F32, sizeof(F32));
htonmemcpy(&mLength, data + 8, MVT_F32, sizeof(F32));
htonmemcpy(&mRate, data + 12, MVT_F32, sizeof(F32));
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index eea768a3ea..ac9dc9544d 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -845,28 +845,42 @@ BOOL LLShaderMgr::linkProgramObject(GLhandleARB obj, BOOL suppress_errors)
LL_WARNS("ShaderLoading") << "GLSL Linker Error:" << LL_ENDL;
}
-// NOTE: Removing LL_DARWIN block as it doesn't seem to actually give the correct answer,
-// but want it for reference once I move it.
-#if 0
- // Force an evaluation of the gl state so the driver can tell if the shader will run in hardware or software
- // per Apple's suggestion
- glBegin(gGL.mMode);
- glEnd();
-
- // Query whether the shader can or cannot run in hardware
- // http://developer.apple.com/qa/qa2007/qa1502.html
- long vertexGPUProcessing;
- CGLContextObj ctx = CGLGetCurrentContext();
- CGLGetParameter (ctx, kCGLCPGPUVertexProcessing, &vertexGPUProcessing);
- long fragmentGPUProcessing;
- CGLGetParameter (ctx, kCGLCPGPUFragmentProcessing, &fragmentGPUProcessing);
- if (!fragmentGPUProcessing || !vertexGPUProcessing)
+#if LL_DARWIN
+
+ // For some reason this absolutely kills the frame rate when VBO's are enabled
+ if (0)
{
- LL_WARNS("ShaderLoading") << "GLSL Linker: Running in Software:" << LL_ENDL;
- success = GL_FALSE;
- suppress_errors = FALSE;
+ // Force an evaluation of the gl state so the driver can tell if the shader will run in hardware or software
+ // per Apple's suggestion
+ LLGLSLShader::sNoFixedFunction = false;
+
+ glUseProgramObjectARB(obj);
+
+ gGL.begin(LLRender::TRIANGLES);
+ gGL.vertex3f(0.0f, 0.0f, 0.0f);
+ gGL.vertex3f(0.0f, 0.0f, 0.0f);
+ gGL.vertex3f(0.0f, 0.0f, 0.0f);
+ gGL.end();
+ gGL.flush();
+
+ glUseProgramObjectARB(0);
+
+ LLGLSLShader::sNoFixedFunction = true;
+
+ // Query whether the shader can or cannot run in hardware
+ // http://developer.apple.com/qa/qa2007/qa1502.html
+ GLint vertexGPUProcessing, fragmentGPUProcessing;
+ CGLContextObj ctx = CGLGetCurrentContext();
+ CGLGetParameter(ctx, kCGLCPGPUVertexProcessing, &vertexGPUProcessing);
+ CGLGetParameter(ctx, kCGLCPGPUFragmentProcessing, &fragmentGPUProcessing);
+ if (!fragmentGPUProcessing || !vertexGPUProcessing)
+ {
+ LL_WARNS("ShaderLoading") << "GLSL Linker: Running in Software:" << LL_ENDL;
+ success = GL_FALSE;
+ suppress_errors = FALSE;
+ }
}
-
+
#else
std::string log = get_object_log(obj);
LLStringUtil::toLower(log);
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 622f3e215c..466fac33ea 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -175,6 +175,7 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
mBorder(NULL),
mSortCallback(NULL),
mPopupMenu(NULL),
+ mCommentTextView(NULL),
mNumDynamicWidthColumns(0),
mTotalStaticColumnWidth(0),
mTotalColumnPadding(0),
@@ -476,7 +477,12 @@ void LLScrollListCtrl::updateLayout()
getRect().getWidth() - 2 * mBorderThickness,
getRect().getHeight() - (2 * mBorderThickness ) - heading_size );
- getChildView("comment_text")->setShape(mItemListRect);
+ if (mCommentTextView == NULL)
+ {
+ mCommentTextView = getChildView("comment_text");
+ }
+
+ mCommentTextView->setShape(mItemListRect);
// how many lines of content in a single "page"
S32 page_lines = getLinesPerPage();
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index 09ab89960d..ae8aea9245 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -480,6 +480,8 @@ private:
S32 mHighlightedItem;
class LLViewBorder* mBorder;
LLContextMenu *mPopupMenu;
+
+ LLView *mCommentTextView;
LLWString mSearchString;
LLFrameTimer mSearchTimer;
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 6c2ff61274..f46b4f472f 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7858,18 +7858,6 @@
<integer>0</integer>
</map>
- <key>RenderAnimateTrees</key>
- <map>
- <key>Comment</key>
- <string>Use GL matrix ops to animate tree branches.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
-
<key>RenderMinimumLODTriangleCount</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index 4cca287356..c012efa056 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -51,19 +51,6 @@ VARYING vec2 vary_texcoord0;
uniform mat4 inv_proj;
-vec4 getPosition(vec2 pos_screen)
-{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
void main()
{
vec2 frag = vary_fragcoord.xy/vary_fragcoord.z*0.5+0.5;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
index 46d42d2a4a..c1fb7b55d4 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
@@ -37,7 +37,7 @@ VARYING vec2 vary_texcoord0;
void main()
{
- float alpha = texture2D(diffuseMap, vary_texcoord0.xy).a * vertex_color.a;
+ float alpha = diffuseLookup(vary_texcoord0.xy).a * vertex_color.a;
if (alpha < minimum_alpha)
{
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl
index 6a3cba771b..7d3b06c56e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl
@@ -34,15 +34,18 @@ VARYING vec4 post_pos;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
+void passTextureIndex();
+
void main()
{
//transform vertex
vec4 pos = modelview_projection_matrix*vec4(position.xyz, 1.0);
-
post_pos = pos;
gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w);
+ passTextureIndex();
+
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
vertex_color = diffuse_color;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index 8d88e93698..1179b212ae 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -56,19 +56,6 @@ uniform float shadow_bias;
uniform mat4 inv_proj;
-vec4 getPosition(vec2 pos_screen)
-{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos.xyz /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl)
{
stc.xyz /= stc.w;
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 390da2273d..1e2fbc677d 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -1,4 +1,4 @@
-version 31
+version 32
// The version number above should be implemented IF AND ONLY IF some
// change has been made that is sufficiently important to justify
// resetting the graphics preferences of all users to the recommended
@@ -67,7 +67,7 @@ RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
WatchdogDisabled 1 1
-RenderUseStreamVBO 1 0
+RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
RenderMaxTextureIndex 1 16
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index ba511a3693..92ac336d0d 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -55,9 +55,30 @@ LLDebugView* gDebugView = NULL;
static LLDefaultChildRegistry::Register<LLDebugView> r("debug_view");
LLDebugView::LLDebugView(const LLDebugView::Params& p)
-: LLView(p)
+: LLView(p),
+ mFastTimerView(NULL),
+ mMemoryView(NULL),
+ mDebugConsolep(NULL),
+ mFloaterSnapRegion(NULL)
{}
+LLDebugView::~LLDebugView()
+{
+ // These have already been deleted. Fix the globals appropriately.
+ gDebugView = NULL;
+ gTextureView = NULL;
+ gSceneView = NULL;
+ gTextureSizeView = NULL;
+ gTextureCategoryView = NULL;
+}
+
+BOOL LLDebugView::postBuild()
+{
+ mFloaterSnapRegion = getRootView()->getChildView("floater_snap_region");
+
+ return TRUE;
+}
+
void LLDebugView::init()
{
LLRect r;
@@ -109,8 +130,6 @@ void LLDebugView::init()
addChild(gTextureView);
//gTextureView->reshape(r.getWidth(), r.getHeight(), TRUE);
-
-
if(gAuditTexture)
{
@@ -136,22 +155,10 @@ void LLDebugView::init()
}
}
-
-LLDebugView::~LLDebugView()
-{
- // These have already been deleted. Fix the globals appropriately.
- gDebugView = NULL;
- gTextureView = NULL;
- gSceneView = NULL;
- gTextureSizeView = NULL;
- gTextureCategoryView = NULL;
-}
-
void LLDebugView::draw()
{
- LLView* floater_snap_region = getRootView()->getChildView("floater_snap_region");
LLRect debug_rect;
- floater_snap_region->localRectToOtherView(floater_snap_region->getLocalRect(), &debug_rect, getParent());
+ mFloaterSnapRegion->localRectToOtherView(mFloaterSnapRegion->getLocalRect(), &debug_rect, getParent());
setShape(debug_rect);
LLView::draw();
diff --git a/indra/newview/lldebugview.h b/indra/newview/lldebugview.h
index 907a42c981..33d6a7394f 100644
--- a/indra/newview/lldebugview.h
+++ b/indra/newview/lldebugview.h
@@ -51,17 +51,21 @@ public:
changeDefault(mouse_opaque, false);
}
};
+
LLDebugView(const Params&);
~LLDebugView();
+ BOOL postBuild();
+
void init();
void draw();
-
+
void setStatsVisible(BOOL visible);
LLFastTimerView* mFastTimerView;
LLMemoryView* mMemoryView;
LLConsole* mDebugConsolep;
+ LLView* mFloaterSnapRegion;
};
extern LLDebugView* gDebugView;
diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h
index c7acbb42c6..5a2981e749 100644
--- a/indra/newview/lldrawpool.h
+++ b/indra/newview/lldrawpool.h
@@ -133,7 +133,6 @@ public:
PASS_ALPHA,
PASS_ALPHA_MASK,
PASS_FULLBRIGHT_ALPHA_MASK,
- PASS_ALPHA_SHADOW,
NUM_RENDER_TYPES,
};
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index d198e28c14..3165a3516c 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -97,25 +97,18 @@ void LLDrawPoolTree::render(S32 pass)
LLGLState test(GL_ALPHA_TEST, LLGLSLShader::sNoFixedFunction ? 0 : 1);
LLOverrideFaceColor color(this, 1.f, 1.f, 1.f, 1.f);
- if (gSavedSettings.getBOOL("RenderAnimateTrees"))
- {
- renderTree();
- }
- else
+ gGL.getTexUnit(sDiffTex)->bind(mTexturep);
+
+ for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
+ iter != mDrawFace.end(); iter++)
{
- gGL.getTexUnit(sDiffTex)->bind(mTexturep);
-
- for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
- iter != mDrawFace.end(); iter++)
+ LLFace *face = *iter;
+ LLVertexBuffer* buff = face->getVertexBuffer();
+ if(buff)
{
- LLFace *face = *iter;
- LLVertexBuffer* buff = face->getVertexBuffer();
- if(buff)
- {
- buff->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK);
- buff->drawRange(LLRender::TRIANGLES, 0, buff->getNumVerts()-1, buff->getNumIndices(), 0);
- gPipeline.addTrianglesDrawn(buff->getNumIndices());
- }
+ buff->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK);
+ buff->drawRange(LLRender::TRIANGLES, 0, buff->getNumVerts()-1, buff->getNumIndices(), 0);
+ gPipeline.addTrianglesDrawn(buff->getNumIndices());
}
}
}
@@ -187,133 +180,6 @@ void LLDrawPoolTree::endShadowPass(S32 pass)
gDeferredTreeShadowProgram.unbind();
}
-
-void LLDrawPoolTree::renderTree(BOOL selecting)
-{
- LLGLState normalize(GL_NORMALIZE, TRUE);
-
- // Bind the texture for this tree.
- gGL.getTexUnit(sDiffTex)->bind(mTexturep.get(), TRUE);
-
- U32 indices_drawn = 0;
-
- gGL.matrixMode(LLRender::MM_MODELVIEW);
-
- for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
- iter != mDrawFace.end(); iter++)
- {
- LLFace *face = *iter;
- LLDrawable *drawablep = face->getDrawable();
-
- if (drawablep->isDead() || !face->getVertexBuffer())
- {
- continue;
- }
-
- face->getVertexBuffer()->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK);
- U16* indicesp = (U16*) face->getVertexBuffer()->getIndicesPointer();
-
- // Render each of the trees
- LLVOTree *treep = (LLVOTree *)drawablep->getVObj().get();
-
- LLColor4U color(255,255,255,255);
-
- if (!selecting || treep->mGLName != 0)
- {
- if (selecting)
- {
- S32 name = treep->mGLName;
-
- color = LLColor4U((U8)(name >> 16), (U8)(name >> 8), (U8)name, 255);
- }
-
- gGLLastMatrix = NULL;
- gGL.loadMatrix(gGLModelView);
- //gGL.pushMatrix();
- F32 mat[16];
- for (U32 i = 0; i < 16; i++)
- mat[i] = (F32) gGLModelView[i];
-
- LLMatrix4 matrix(mat);
-
- // Translate to tree base HACK - adjustment in Z plants tree underground
- const LLVector3 &pos_agent = treep->getPositionAgent();
- //gGL.translatef(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ] - 0.1f);
- LLMatrix4 trans_mat;
- trans_mat.setTranslation(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ] - 0.1f);
- trans_mat *= matrix;
-
- // Rotate to tree position and bend for current trunk/wind
- // Note that trunk stiffness controls the amount of bend at the trunk as
- // opposed to the crown of the tree
- //
- const F32 TRUNK_STIFF = 22.f;
-
- LLQuaternion rot =
- LLQuaternion(treep->mTrunkBend.magVec()*TRUNK_STIFF*DEG_TO_RAD, LLVector4(treep->mTrunkBend.mV[VX], treep->mTrunkBend.mV[VY], 0)) *
- LLQuaternion(90.f*DEG_TO_RAD, LLVector4(0,0,1)) *
- treep->getRotation();
-
- LLMatrix4 rot_mat(rot);
- rot_mat *= trans_mat;
-
- F32 radius = treep->getScale().magVec()*0.05f;
- LLMatrix4 scale_mat;
- scale_mat.mMatrix[0][0] =
- scale_mat.mMatrix[1][1] =
- scale_mat.mMatrix[2][2] = radius;
-
- scale_mat *= rot_mat;
-
- const F32 THRESH_ANGLE_FOR_BILLBOARD = 15.f;
- const F32 BLEND_RANGE_FOR_BILLBOARD = 3.f;
-
- F32 droop = treep->mDroop + 25.f*(1.f - treep->mTrunkBend.magVec());
-
- S32 stop_depth = 0;
- F32 app_angle = treep->getAppAngle()*LLVOTree::sTreeFactor;
- F32 alpha = 1.0;
- S32 trunk_LOD = LLVOTree::sMAX_NUM_TREE_LOD_LEVELS;
-
- for (S32 j = 0; j < 4; j++)
- {
-
- if (app_angle > LLVOTree::sLODAngles[j])
- {
- trunk_LOD = j;
- break;
- }
- }
- if(trunk_LOD >= LLVOTree::sMAX_NUM_TREE_LOD_LEVELS)
- {
- continue ; //do not render.
- }
-
- if (app_angle < (THRESH_ANGLE_FOR_BILLBOARD - BLEND_RANGE_FOR_BILLBOARD))
- {
- //
- // Draw only the billboard
- //
- // Only the billboard, can use closer to normal alpha func.
- stop_depth = -1;
- LLFacePool::LLOverrideFaceColor clr(this, color);
- indices_drawn += treep->drawBranchPipeline(scale_mat, indicesp, trunk_LOD, stop_depth, treep->mDepth, treep->mTrunkDepth, 1.0, treep->mTwist, droop, treep->mBranches, alpha);
- }
- else // if (app_angle > (THRESH_ANGLE_FOR_BILLBOARD + BLEND_RANGE_FOR_BILLBOARD))
- {
- //
- // Draw only the full geometry tree
- //
- //stop_depth = (app_angle < THRESH_ANGLE_FOR_RECURSION_REDUCTION);
- LLFacePool::LLOverrideFaceColor clr(this, color);
- indices_drawn += treep->drawBranchPipeline(scale_mat, indicesp, trunk_LOD, stop_depth, treep->mDepth, treep->mTrunkDepth, 1.0, treep->mTwist, droop, treep->mBranches, alpha);
- }
-
- //gGL.popMatrix();
- }
- }
-}
-
BOOL LLDrawPoolTree::verify() const
{
/* BOOL ok = TRUE;
diff --git a/indra/newview/lldrawpooltree.h b/indra/newview/lldrawpooltree.h
index ddb259bb82..e7e25453cf 100644
--- a/indra/newview/lldrawpooltree.h
+++ b/indra/newview/lldrawpooltree.h
@@ -68,9 +68,6 @@ public:
/*virtual*/ LLColor3 getDebugColor() const; // For AGP debug display
static S32 sDiffTex;
-
-private:
- void renderTree(BOOL selecting = FALSE);
};
#endif // LL_LLDRAWPOOLTREE_H
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index f410c31f44..02f1899e6e 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -55,6 +55,15 @@ LLFloaterWebContent::_Params::_Params()
LLFloaterWebContent::LLFloaterWebContent( const Params& params )
: LLFloater( params ),
LLInstanceTracker<LLFloaterWebContent, std::string>(params.id()),
+ mWebBrowser(NULL),
+ mAddressCombo(NULL),
+ mSecureLockIcon(NULL),
+ mStatusBarText(NULL),
+ mStatusBarProgress(NULL),
+ mBtnBack(NULL),
+ mBtnForward(NULL),
+ mBtnReload(NULL),
+ mBtnStop(NULL),
mUUID(params.id()),
mShowPageTitle(params.show_page_title)
{
@@ -74,11 +83,16 @@ BOOL LLFloaterWebContent::postBuild()
mStatusBarText = getChild< LLTextBox >( "statusbartext" );
mStatusBarProgress = getChild<LLProgressBar>("statusbarprogress" );
+ mBtnBack = getChildView( "back" );
+ mBtnForward = getChildView( "forward" );
+ mBtnReload = getChildView( "reload" );
+ mBtnStop = getChildView( "stop" );
+
// observe browser events
mWebBrowser->addObserver( this );
// these buttons are always enabled
- getChildView("reload")->setEnabled( true );
+ mBtnReload->setEnabled( true );
getChildView("popexternal")->setEnabled( true );
// cache image for secure browsing
@@ -276,8 +290,8 @@ void LLFloaterWebContent::onClose(bool app_quitting)
void LLFloaterWebContent::draw()
{
// this is asynchronous so we need to keep checking
- getChildView( "back" )->setEnabled( mWebBrowser->canNavigateBack() );
- getChildView( "forward" )->setEnabled( mWebBrowser->canNavigateForward() );
+ mBtnBack->setEnabled( mWebBrowser->canNavigateBack() );
+ mBtnForward->setEnabled( mWebBrowser->canNavigateForward() );
LLFloater::draw();
}
@@ -297,12 +311,12 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
else if(event == MEDIA_EVENT_NAVIGATE_BEGIN)
{
// flags are sent with this event
- getChildView("back")->setEnabled( self->getHistoryBackAvailable() );
- getChildView("forward")->setEnabled( self->getHistoryForwardAvailable() );
+ mBtnBack->setEnabled( self->getHistoryBackAvailable() );
+ mBtnForward->setEnabled( self->getHistoryForwardAvailable() );
// toggle visibility of these buttons based on browser state
- getChildView("reload")->setVisible( false );
- getChildView("stop")->setVisible( true );
+ mBtnReload->setVisible( false );
+ mBtnStop->setVisible( true );
// turn "on" progress bar now we're about to start loading
mStatusBarProgress->setVisible( true );
@@ -310,12 +324,12 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
else if(event == MEDIA_EVENT_NAVIGATE_COMPLETE)
{
// flags are sent with this event
- getChildView("back")->setEnabled( self->getHistoryBackAvailable() );
- getChildView("forward")->setEnabled( self->getHistoryForwardAvailable() );
+ mBtnBack->setEnabled( self->getHistoryBackAvailable() );
+ mBtnForward->setEnabled( self->getHistoryForwardAvailable() );
// toggle visibility of these buttons based on browser state
- getChildView("reload")->setVisible( true );
- getChildView("stop")->setVisible( false );
+ mBtnReload->setVisible( true );
+ mBtnStop->setVisible( false );
// turn "off" progress bar now we're loaded
mStatusBarProgress->setVisible( false );
@@ -421,8 +435,8 @@ void LLFloaterWebContent::onClickStop()
// still should happen when we catch the navigate complete event
// but sometimes (don't know why) that event isn't sent from Qt
// and we ghetto a point where the stop button stays active.
- getChildView("reload")->setVisible( true );
- getChildView("stop")->setVisible( false );
+ mBtnReload->setVisible( true );
+ mBtnStop->setVisible( false );
}
void LLFloaterWebContent::onEnterAddress()
diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h
index 6fc66d1ad8..0340eedd93 100644
--- a/indra/newview/llfloaterwebcontent.h
+++ b/indra/newview/llfloaterwebcontent.h
@@ -97,6 +97,12 @@ protected:
LLIconCtrl* mSecureLockIcon;
LLTextBox* mStatusBarText;
LLProgressBar* mStatusBarProgress;
+
+ LLView* mBtnBack;
+ LLView* mBtnForward;
+ LLView* mBtnReload;
+ LLView* mBtnStop;
+
std::string mCurrentURL;
std::string mUUID;
bool mShowPageTitle;
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 114472ba56..183063f1db 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -71,9 +71,14 @@ static LLChatTypeTrigger sChatTypeTriggers[] = {
};
LLNearbyChatBar::LLNearbyChatBar(const LLSD& key)
- : LLFloater(key),
- mChatBox(NULL)
-{ mSpeakerMgr = LLLocalSpeakerMgr::getInstance();
+: LLFloater(key),
+ mChatBox(NULL),
+ mNearbyChat(NULL),
+ mOutputMonitor(NULL),
+ mSpeakerMgr(NULL),
+ mExpandedHeight(COLLAPSED_HEIGHT + EXPANDED_HEIGHT)
+{
+ mSpeakerMgr = LLLocalSpeakerMgr::getInstance();
}
//virtual
@@ -95,6 +100,7 @@ BOOL LLNearbyChatBar::postBuild()
mChatBox->setEnableLineHistory(TRUE);
mChatBox->setFont(LLViewerChat::getChatFont());
+ mNearbyChat = getChildView("nearby_chat");
LLUICtrl* show_btn = getChild<LLUICtrl>("show_nearby_chat");
show_btn->setCommitCallback(boost::bind(&LLNearbyChatBar::onToggleNearbyChatPanel, this));
@@ -105,8 +111,6 @@ BOOL LLNearbyChatBar::postBuild()
// Register for font change notifications
LLViewerChat::setFontChangedCallback(boost::bind(&LLNearbyChatBar::onChatFontChange, this, _1));
- mExpandedHeight = COLLAPSED_HEIGHT + EXPANDED_HEIGHT;
-
enableResizeCtrls(true, true, false);
return TRUE;
@@ -116,8 +120,7 @@ bool LLNearbyChatBar::applyRectControl()
{
bool rect_controlled = LLFloater::applyRectControl();
- LLView* nearby_chat = getChildView("nearby_chat");
- if (!nearby_chat->getVisible())
+ if (!mNearbyChat->getVisible())
{
reshape(getRect().getWidth(), getMinHeight());
enableResizeCtrls(true, true, false);
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index e9734899b3..c2f57dc4ca 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -84,9 +84,10 @@ protected:
// Which non-zero channel did we last chat on?
static S32 sLastSpecialChatChannel;
- LLLineEditor* mChatBox;
- LLOutputMonitorCtrl* mOutputMonitor;
- LLLocalSpeakerMgr* mSpeakerMgr;
+ LLLineEditor* mChatBox;
+ LLView* mNearbyChat;
+ LLOutputMonitorCtrl* mOutputMonitor;
+ LLLocalSpeakerMgr* mSpeakerMgr;
S32 mExpandedHeight;
};
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index c43c95a366..7a17dbce3d 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -365,12 +365,15 @@ void LLNearbyChatScreenChannel::arrangeToasts()
if(mStopProcessing || isHovering())
return;
- LLView* floater_snap_region = gViewerWindow->getRootView()->getChildView("floater_snap_region");
-
+ if (mFloaterSnapRegion == NULL)
+ {
+ mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ }
+
if (!getParent())
{
// connect to floater snap region just to get resize events, we don't care about being a proper widget
- floater_snap_region->addChild(this);
+ mFloaterSnapRegion->addChild(this);
setFollows(FOLLOWS_ALL);
}
@@ -378,7 +381,7 @@ void LLNearbyChatScreenChannel::arrangeToasts()
updateRect();
LLRect channel_rect;
- floater_snap_region->localRectToOtherView(floater_snap_region->getLocalRect(), &channel_rect, gFloaterView);
+ mFloaterSnapRegion->localRectToOtherView(mFloaterSnapRegion->getLocalRect(), &channel_rect, gFloaterView);
channel_rect.mLeft += 10;
channel_rect.mRight = channel_rect.mLeft + 300;
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 15ba5195d9..5301955964 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -53,13 +53,22 @@ LLFastTimer::DeclareTimer FTM_GET_CHANNEL_RECT("Calculate Notification Channel R
LLRect LLScreenChannelBase::getChannelRect()
{
LLFastTimer _(FTM_GET_CHANNEL_RECT);
+
+ if (mFloaterSnapRegion == NULL)
+ {
+ mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ }
+
+ if (mChicletRegion == NULL)
+ {
+ mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container");
+ }
+
LLRect channel_rect;
LLRect chiclet_rect;
- LLView* floater_snap_region = gViewerWindow->getRootView()->getChildView("floater_snap_region");
- floater_snap_region->localRectToScreen(floater_snap_region->getLocalRect(), &channel_rect);
- LLView* chiclet_region = gViewerWindow->getRootView()->getChildView("chiclet_container");
- chiclet_region->localRectToScreen(chiclet_region->getLocalRect(), &chiclet_rect);
+ mFloaterSnapRegion->localRectToScreen(mFloaterSnapRegion->getLocalRect(), &channel_rect);
+ mChicletRegion->localRectToScreen(mChicletRegion->getLocalRect(), &chiclet_rect);
channel_rect.mTop = chiclet_rect.mBottom;
return channel_rect;
@@ -81,14 +90,31 @@ LLScreenChannelBase::LLScreenChannelBase(const Params& p)
mShowToasts(true),
mID(p.id),
mDisplayToastsAlways(p.display_toasts_always),
- mChannelAlignment(p.channel_align)
-{
+ mChannelAlignment(p.channel_align),
+ mFloaterSnapRegion(NULL),
+ mChicletRegion(NULL)
+{
mID = p.id;
setMouseOpaque( false );
setVisible(FALSE);
}
+BOOL LLScreenChannelBase::postBuild()
+{
+ if (mFloaterSnapRegion == NULL)
+ {
+ mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ }
+
+ if (mChicletRegion == NULL)
+ {
+ mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container");
+ }
+
+ return TRUE;
+}
+
void LLScreenChannelBase::reshape(S32 width, S32 height, BOOL called_from_parent)
{
redrawToasts();
@@ -473,12 +499,10 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel)
//--------------------------------------------------------------------------
void LLScreenChannel::redrawToasts()
{
- LLView* floater_snap_region = gViewerWindow->getRootView()->getChildView("floater_snap_region");
-
if (!getParent())
{
// connect to floater snap region just to get resize events, we don't care about being a proper widget
- floater_snap_region->addChild(this);
+ mFloaterSnapRegion->addChild(this);
setFollows(FOLLOWS_ALL);
}
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index 2f23552828..c9f8855fe6 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -69,6 +69,8 @@ public:
};
LLScreenChannelBase(const Params&);
+
+ BOOL postBuild();
void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
@@ -123,7 +125,7 @@ protected:
// Channel's flags
bool mControlHovering;
- LLToast* mHoveredToast;
+ LLToast* mHoveredToast;
bool mCanStoreToasts;
bool mDisplayToastsAlways;
// controls whether a channel shows toasts or not
@@ -137,6 +139,9 @@ protected:
// channel's ID
LLUUID mID;
+
+ LLView* mFloaterSnapRegion;
+ LLView* mChicletRegion;
};
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 8774482acd..24cb559fd0 100644
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -117,6 +117,42 @@ BOOL LLSidepanelTaskInfo::postBuild()
childSetCommitCallback("checkbox next owner can transfer", &LLSidepanelTaskInfo::onCommitNextOwnerTransfer,this);
childSetCommitCallback("clickaction", &LLSidepanelTaskInfo::onCommitClickAction,this);
childSetCommitCallback("search_check", &LLSidepanelTaskInfo::onCommitIncludeInSearch,this);
+
+ mDAPermModify = getChild<LLUICtrl>("perm_modify");
+ mDACreator = getChildView("Creator:");
+ mDACreatorName = getChild<LLUICtrl>("Creator Name");
+ mDAOwner = getChildView("Owner:");
+ mDAOwnerName = getChild<LLUICtrl>("Owner Name");
+ mDAGroup = getChildView("Group:");
+ mDAGroupName = getChild<LLUICtrl>("Group Name");
+ mDAButtonSetGroup = getChildView("button set group");
+ mDAObjectName = getChild<LLUICtrl>("Object Name");
+ mDAName = getChildView("Name:");
+ mDADescription = getChildView("Description:");
+ mDAObjectDescription = getChild<LLUICtrl>("Object Description");
+ mDAPermissions = getChildView("Permissions:");
+ mDACheckboxShareWithGroup = getChild<LLUICtrl>("checkbox share with group");
+ mDAButtonDeed = getChildView("button deed");
+ mDACheckboxAllowEveryoneMove = getChild<LLUICtrl>("checkbox allow everyone move");
+ mDACheckboxAllowEveryoneCopy = getChild<LLUICtrl>("checkbox allow everyone copy");
+ mDANextOwnerCan = getChildView("Next owner can:");
+ mDACheckboxNextOwnerCanModify = getChild<LLUICtrl>("checkbox next owner can modify");
+ mDACheckboxNextOwnerCanCopy = getChild<LLUICtrl>("checkbox next owner can copy");
+ mDACheckboxNextOwnerCanTransfer = getChild<LLUICtrl>("checkbox next owner can transfer");
+ mDACheckboxForSale = getChild<LLUICtrl>("checkbox for sale");
+ mDASearchCheck = getChild<LLUICtrl>("search_check");
+ mDAComboSaleType = getChild<LLComboBox>("sale type");
+ mDACost = getChild<LLUICtrl>("Cost");
+ mDAEditCost = getChild<LLUICtrl>("Edit Cost");
+ mDALabelClickAction = getChildView("label click action");
+ mDAComboClickAction = getChild<LLComboBox>("clickaction");
+ mDAB = getChildView("B:");
+ mDAO = getChildView("O:");
+ mDAG = getChildView("G:");
+ mDAE = getChildView("E:");
+ mDAN = getChildView("N:");
+ mDAF = getChildView("F:");
+
return TRUE;
}
@@ -138,81 +174,80 @@ BOOL LLSidepanelTaskInfo::postBuild()
void LLSidepanelTaskInfo::disableAll()
{
- getChildView("perm_modify")->setEnabled(FALSE);
- getChild<LLUICtrl>("perm_modify")->setValue(LLStringUtil::null);
-
- getChildView("Creator:")->setEnabled(FALSE);
- getChild<LLUICtrl>("Creator Name")->setValue(LLStringUtil::null);
- getChildView("Creator Name")->setEnabled(FALSE);
-
- getChildView("Owner:")->setEnabled(FALSE);
- getChild<LLUICtrl>("Owner Name")->setValue(LLStringUtil::null);
- getChildView("Owner Name")->setEnabled(FALSE);
-
- getChildView("Group:")->setEnabled(FALSE);
- getChild<LLUICtrl>("Group Name")->setValue(LLStringUtil::null);
- getChildView("Group Name")->setEnabled(FALSE);
- getChildView("button set group")->setEnabled(FALSE);
-
- getChild<LLUICtrl>("Object Name")->setValue(LLStringUtil::null);
- getChildView("Object Name")->setEnabled(FALSE);
- getChildView("Name:")->setEnabled(FALSE);
- getChild<LLUICtrl>("Group Name")->setValue(LLStringUtil::null);
- getChildView("Group Name")->setEnabled(FALSE);
- getChildView("Description:")->setEnabled(FALSE);
- getChild<LLUICtrl>("Object Description")->setValue(LLStringUtil::null);
- getChildView("Object Description")->setEnabled(FALSE);
-
- getChildView("Permissions:")->setEnabled(FALSE);
+ mDAPermModify->setEnabled(FALSE);
+ mDAPermModify->setValue(LLStringUtil::null);
+
+ mDACreator->setEnabled(FALSE);
+ mDACreatorName->setValue(LLStringUtil::null);
+ mDACreatorName->setEnabled(FALSE);
+
+ mDAOwner->setEnabled(FALSE);
+ mDAOwnerName->setValue(LLStringUtil::null);
+ mDAOwnerName->setEnabled(FALSE);
+
+ mDAGroup->setEnabled(FALSE);
+ mDAGroupName->setValue(LLStringUtil::null);
+ mDAGroupName->setEnabled(FALSE);
+ mDAButtonSetGroup->setEnabled(FALSE);
+
+ mDAObjectName->setValue(LLStringUtil::null);
+ mDAObjectName->setEnabled(FALSE);
+ mDAName->setEnabled(FALSE);
+ mDAGroupName->setValue(LLStringUtil::null);
+ mDAGroupName->setEnabled(FALSE);
+ mDADescription->setEnabled(FALSE);
+ mDAObjectDescription->setValue(LLStringUtil::null);
+ mDAObjectDescription->setEnabled(FALSE);
+
+ mDAPermissions->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox share with group")->setValue(FALSE);
- getChildView("checkbox share with group")->setEnabled(FALSE);
- getChildView("button deed")->setEnabled(FALSE);
+ mDACheckboxShareWithGroup->setValue(FALSE);
+ mDACheckboxShareWithGroup->setEnabled(FALSE);
+ mDAButtonDeed->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox allow everyone move")->setValue(FALSE);
- getChildView("checkbox allow everyone move")->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(FALSE);
- getChildView("checkbox allow everyone copy")->setEnabled(FALSE);
+ mDACheckboxAllowEveryoneMove->setValue(FALSE);
+ mDACheckboxAllowEveryoneMove->setEnabled(FALSE);
+ mDACheckboxAllowEveryoneCopy->setValue(FALSE);
+ mDACheckboxAllowEveryoneCopy->setEnabled(FALSE);
//Next owner can:
- getChildView("Next owner can:")->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox next owner can modify")->setValue(FALSE);
- getChildView("checkbox next owner can modify")->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox next owner can copy")->setValue(FALSE);
- getChildView("checkbox next owner can copy")->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(FALSE);
- getChildView("checkbox next owner can transfer")->setEnabled(FALSE);
+ mDANextOwnerCan->setEnabled(FALSE);
+ mDACheckboxNextOwnerCanModify->setValue(FALSE);
+ mDACheckboxNextOwnerCanModify->setEnabled(FALSE);
+ mDACheckboxNextOwnerCanCopy->setValue(FALSE);
+ mDACheckboxNextOwnerCanCopy->setEnabled(FALSE);
+ mDACheckboxNextOwnerCanTransfer->setValue(FALSE);
+ mDACheckboxNextOwnerCanTransfer->setEnabled(FALSE);
//checkbox for sale
- getChild<LLUICtrl>("checkbox for sale")->setValue(FALSE);
- getChildView("checkbox for sale")->setEnabled(FALSE);
+ mDACheckboxForSale->setValue(FALSE);
+ mDACheckboxForSale->setEnabled(FALSE);
//checkbox include in search
- getChild<LLUICtrl>("search_check")->setValue(FALSE);
- getChildView("search_check")->setEnabled(FALSE);
+ mDASearchCheck->setValue(FALSE);
+ mDASearchCheck->setEnabled(FALSE);
- LLComboBox* combo_sale_type = getChild<LLComboBox>("sale type");
- combo_sale_type->setValue(LLSaleInfo::FS_COPY);
- combo_sale_type->setEnabled(FALSE);
+ mDAComboSaleType->setValue(LLSaleInfo::FS_COPY);
+ mDAComboSaleType->setEnabled(FALSE);
- getChildView("Cost")->setEnabled(FALSE);
- getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default"));
- getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null);
- getChildView("Edit Cost")->setEnabled(FALSE);
+ mDACost->setEnabled(FALSE);
+ mDACost->setValue(getString("Cost Default"));
+ mDAEditCost->setValue(LLStringUtil::null);
+ mDAEditCost->setEnabled(FALSE);
- getChildView("label click action")->setEnabled(FALSE);
- LLComboBox* combo_click_action = getChild<LLComboBox>("clickaction");
- if (combo_click_action)
+ mDALabelClickAction->setEnabled(FALSE);
+ if (mDAComboClickAction)
{
- combo_click_action->setEnabled(FALSE);
- combo_click_action->clear();
+ mDAComboClickAction->setEnabled(FALSE);
+ mDAComboClickAction->clear();
}
- getChildView("B:")->setVisible( FALSE);
- getChildView("O:")->setVisible( FALSE);
- getChildView("G:")->setVisible( FALSE);
- getChildView("E:")->setVisible( FALSE);
- getChildView("N:")->setVisible( FALSE);
- getChildView("F:")->setVisible( FALSE);
+
+ mDAB->setVisible(FALSE);
+ mDAO->setVisible(FALSE);
+ mDAG->setVisible(FALSE);
+ mDAE->setVisible(FALSE);
+ mDAN->setVisible(FALSE);
+ mDAF->setVisible(FALSE);
mOpenBtn->setEnabled(FALSE);
mPayBtn->setEnabled(FALSE);
diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h
index 384bc479d6..be0fee2127 100644
--- a/indra/newview/llsidepaneltaskinfo.h
+++ b/indra/newview/llsidepaneltaskinfo.h
@@ -37,8 +37,9 @@
// Panel for permissions of an object.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLNameBox;
class LLCheckBoxCtrl;
+class LLComboBox;
+class LLNameBox;
class LLViewerObject;
class LLSidepanelTaskInfo : public LLSidepanelInventorySubpanel
@@ -118,6 +119,43 @@ private:
LLPointer<LLViewerObject> mObject;
LLObjectSelectionHandle mObjectSelection;
static LLSidepanelTaskInfo* sActivePanel;
+
+private:
+ // Pointers cached here to speed up the "disableAll" function which gets called on idle
+ LLUICtrl* mDAPermModify;
+ LLView* mDACreator;
+ LLUICtrl* mDACreatorName;
+ LLView* mDAOwner;
+ LLUICtrl* mDAOwnerName;
+ LLView* mDAGroup;
+ LLUICtrl* mDAGroupName;
+ LLView* mDAButtonSetGroup;
+ LLUICtrl* mDAObjectName;
+ LLView* mDAName;
+ LLView* mDADescription;
+ LLUICtrl* mDAObjectDescription;
+ LLView* mDAPermissions;
+ LLUICtrl* mDACheckboxShareWithGroup;
+ LLView* mDAButtonDeed;
+ LLUICtrl* mDACheckboxAllowEveryoneMove;
+ LLUICtrl* mDACheckboxAllowEveryoneCopy;
+ LLView* mDANextOwnerCan;
+ LLUICtrl* mDACheckboxNextOwnerCanModify;
+ LLUICtrl* mDACheckboxNextOwnerCanCopy;
+ LLUICtrl* mDACheckboxNextOwnerCanTransfer;
+ LLUICtrl* mDACheckboxForSale;
+ LLUICtrl* mDASearchCheck;
+ LLComboBox* mDAComboSaleType;
+ LLUICtrl* mDACost;
+ LLUICtrl* mDAEditCost;
+ LLView* mDALabelClickAction;
+ LLComboBox* mDAComboClickAction;
+ LLView* mDAB;
+ LLView* mDAO;
+ LLView* mDAG;
+ LLView* mDAE;
+ LLView* mDAN;
+ LLView* mDAF;
};
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 75db269bde..89240c982f 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -114,6 +114,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect)
mTextTime(NULL),
mSGBandwidth(NULL),
mSGPacketLoss(NULL),
+ mBtnStats(NULL),
mBtnVolume(NULL),
mBoxBalance(NULL),
mBalance(0),
@@ -173,6 +174,8 @@ BOOL LLStatusBar::postBuild()
mBoxBalance = getChild<LLTextBox>("balance");
mBoxBalance->setClickedCallback( &LLStatusBar::onClickBalance, this );
+
+ mBtnStats = getChildView("stat_btn");
mBtnVolume = getChild<LLButton>( "volume_btn" );
mBtnVolume->setClickedCallback( onClickVolume, this );
@@ -288,7 +291,7 @@ void LLStatusBar::refresh()
mSGBandwidth->setVisible(net_stats_visible);
mSGPacketLoss->setVisible(net_stats_visible);
- getChildView("stat_btn")->setEnabled(net_stats_visible);
+ mBtnStats->setEnabled(net_stats_visible);
// update the master volume button state
bool mute_audio = LLAppViewer::instance()->getMasterSystemAudioMute();
diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h
index 4ea3183d18..9d28e6c2bc 100644
--- a/indra/newview/llstatusbar.h
+++ b/indra/newview/llstatusbar.h
@@ -102,10 +102,11 @@ private:
LLStatGraph *mSGBandwidth;
LLStatGraph *mSGPacketLoss;
+ LLView *mBtnStats;
LLButton *mBtnVolume;
LLTextBox *mBoxBalance;
LLButton *mMediaToggle;
- LLView* mScriptOut;
+ LLView *mScriptOut;
LLFrameTimer mClockUpdateTimer;
S32 mBalance;
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 73e4d11d7b..093b84413a 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -564,7 +564,6 @@ void settings_setup_listeners()
gSavedSettings.getControl("OctreeAttachmentSizeFactor")->getSignal()->connect(boost::bind(&handleRepartition, _2));
gSavedSettings.getControl("RenderMaxTextureIndex")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderUseTriStrips")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
- gSavedSettings.getControl("RenderAnimateTrees")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("RenderAvatarVP")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("VertexShaderEnable")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderUIBuffer")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 3f0b5bf3fb..cb40af7061 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -230,7 +230,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
glClear(GL_COLOR_BUFFER_BIT);
gViewerWindow->getWindow()->swapBuffers();
LLPipeline::refreshCachedSettings();
- LLPipeline::refreshRenderDeferred();
gPipeline.resizeScreenTexture();
gResizeScreenTexture = FALSE;
gWindowResized = FALSE;
@@ -617,9 +616,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
//Increment drawable frame counter
LLDrawable::incrementVisible();
- LLPipeline::refreshCachedSettings();
- LLPipeline::refreshRenderDeferred();
-
LLSpatialGroup::sNoDelete = TRUE;
LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName();
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 18ae83e3b6..bddc07b395 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -1338,6 +1338,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
gDeferredShadowAlphaMaskProgram.mName = "Deferred Shadow Alpha Mask Shader";
+ gDeferredShadowAlphaMaskProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
gDeferredShadowAlphaMaskProgram.mShaderFiles.clear();
gDeferredShadowAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredShadowAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskF.glsl", GL_FRAGMENT_SHADER_ARB));
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 4c33716c32..4767ba2bed 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -690,7 +690,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mFullyLoadedInitialized(FALSE),
mSupportsAlphaLayers(FALSE),
mLoadedCallbacksPaused(FALSE),
- mHasPelvisOffset( FALSE )
+ mHasPelvisOffset( FALSE ),
+ mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar"))
{
LLMemType mt(LLMemType::MTYPE_AVATAR);
//VTResume(); // VTune
@@ -6493,10 +6494,7 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading)
BOOL LLVOAvatar::isFullyLoaded() const
{
- if (gSavedSettings.getBOOL("RenderUnloadedAvatar"))
- return TRUE;
- else
- return mFullyLoaded;
+ return (mRenderUnloadedAvatar || mFullyLoaded);
}
bool LLVOAvatar::isTooComplex() const
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index e53b8e3f4b..59796370ae 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -40,6 +40,7 @@
#include "lldrawpoolalpha.h"
#include "llviewerobject.h"
#include "llcharacter.h"
+#include "llcontrol.h"
#include "llviewerjointmesh.h"
#include "llviewerjointattachment.h"
#include "llrendertarget.h"
@@ -450,6 +451,8 @@ private:
F32 mImpostorDistance;
F32 mImpostorPixelArea;
LLVector3 mLastAnimExtents[2];
+
+ LLCachedControl<bool> mRenderUnloadedAvatar;
//--------------------------------------------------------------------
// Wind rippling in clothes
diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp
index 6486fd24ea..4564207da4 100644
--- a/indra/newview/llvotree.cpp
+++ b/indra/newview/llvotree.cpp
@@ -341,45 +341,11 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys,
BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
{
- const U16 FRAMES_PER_WIND_UPDATE = 20; // How many frames between wind update per tree
- const F32 TREE_WIND_SENSITIVITY = 0.005f;
- const F32 TREE_TRUNK_STIFFNESS = 0.1f;
-
if (mDead || !(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_TREE)))
{
return TRUE;
}
- if (gSavedSettings.getBOOL("RenderAnimateTrees"))
- {
- F32 mass_inv;
-
- // For all tree objects, update the trunk bending with the current wind
- // Walk sprite list in order away from viewer
- if (!(mFrameCount % FRAMES_PER_WIND_UPDATE))
- {
- // If needed, Get latest wind for this tree
- mWind = mRegionp->mWind.getVelocity(getPositionRegion());
- }
- mFrameCount++;
-
- mass_inv = 1.f/(5.f + mDepth*mBranches*0.2f);
- mTrunkVel += (mWind * mass_inv * TREE_WIND_SENSITIVITY); // Pull in direction of wind
- mTrunkVel -= (mTrunkBend * mass_inv * TREE_TRUNK_STIFFNESS); // Restoring force in direction of trunk
- mTrunkBend += mTrunkVel;
- mTrunkVel *= 0.99f; // Add damping
-
- if (mTrunkBend.length() > 1.f)
- {
- mTrunkBend.normalize();
- }
-
- if (mTrunkVel.length() > 1.f)
- {
- mTrunkVel.normalize();
- }
- }
-
S32 trunk_LOD = sMAX_NUM_TREE_LOD_LEVELS ;
F32 app_angle = getAppAngle()*LLVOTree::sTreeFactor;
@@ -392,39 +358,36 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
}
}
- if (!gSavedSettings.getBOOL("RenderAnimateTrees"))
+ if (mReferenceBuffer.isNull())
{
- if (mReferenceBuffer.isNull())
- {
- gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE);
- }
- else if (trunk_LOD != mTrunkLOD)
+ gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE);
+ }
+ else if (trunk_LOD != mTrunkLOD)
+ {
+ gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, FALSE);
+ }
+ else
+ {
+ // we're not animating but we may *still* need to
+ // regenerate the mesh if we moved, since position
+ // and rotation are baked into the mesh.
+ // *TODO: I don't know what's so special about trees
+ // that they don't get REBUILD_POSITION automatically
+ // at a higher level.
+ const LLVector3 &this_position = getPositionAgent();
+ if (this_position != mLastPosition)
{
- gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, FALSE);
+ gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_POSITION);
+ mLastPosition = this_position;
}
else
{
- // we're not animating but we may *still* need to
- // regenerate the mesh if we moved, since position
- // and rotation are baked into the mesh.
- // *TODO: I don't know what's so special about trees
- // that they don't get REBUILD_POSITION automatically
- // at a higher level.
- const LLVector3 &this_position = getPositionAgent();
- if (this_position != mLastPosition)
+ const LLQuaternion &this_rotation = getRotation();
+
+ if (this_rotation != mLastRotation)
{
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_POSITION);
- mLastPosition = this_position;
- }
- else
- {
- const LLQuaternion &this_rotation = getRotation();
-
- if (this_rotation != mLastRotation)
- {
- gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_POSITION);
- mLastRotation = this_rotation;
- }
+ mLastRotation = this_rotation;
}
}
}
@@ -559,7 +522,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable)
max_vertices += sLODVertexCount[lod];
}
- mReferenceBuffer = new LLVertexBuffer(LLDrawPoolTree::VERTEX_DATA_MASK, gSavedSettings.getBOOL("RenderAnimateTrees") ? GL_STATIC_DRAW_ARB : 0);
+ mReferenceBuffer = new LLVertexBuffer(LLDrawPoolTree::VERTEX_DATA_MASK, 0);
mReferenceBuffer->allocateBuffer(max_vertices, max_indices, TRUE);
LLStrider<LLVector3> vertices;
@@ -863,15 +826,8 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable)
llassert(index_count == max_indices);
}
- if (gSavedSettings.getBOOL("RenderAnimateTrees"))
- {
- mDrawable->getFace(0)->setVertexBuffer(mReferenceBuffer);
- }
- else
- {
- //generate tree mesh
- updateMesh();
- }
+ //generate tree mesh
+ updateMesh();
return TRUE;
}
diff --git a/indra/newview/llvotree.h b/indra/newview/llvotree.h
index 1e1deede26..0554935539 100644
--- a/indra/newview/llvotree.h
+++ b/indra/newview/llvotree.h
@@ -152,7 +152,6 @@ public:
friend class LLDrawPoolTree;
protected:
LLVector3 mTrunkBend; // Accumulated wind (used for blowing trees)
- LLVector3 mTrunkVel; //
LLVector3 mWind;
LLPointer<LLVertexBuffer> mReferenceBuffer; //reference geometry for generating tree mesh
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index baab191cb6..20f8674655 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4624,6 +4624,19 @@ struct CompareBatchBreakerModified
void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort, BOOL batch_textures)
{
+ U32 buffer_usage = group->mBufferUsage;
+
+#if LL_DARWIN
+ // HACK from Leslie:
+ // Disable VBO usage for alpha on Mac OS X because it kills the framerate
+ // due to implicit calls to glTexSubImage that are beyond our control.
+ // (this works because the only calls here that sort by distance are alpha)
+ if (distance_sort)
+ {
+ buffer_usage = 0x0;
+ }
+#endif
+
//calculate maximum number of vertices to store in a single buffer
U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcVertexSize(group->mSpatialPartition->mVertexDataMask);
max_vertices = llmin(max_vertices, (U32) 65535);
@@ -4805,17 +4818,15 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
if (!buffer)
{ //create new buffer if needed
- buffer = createVertexBuffer(mask,
- group->mBufferUsage);
+ buffer = createVertexBuffer(mask, buffer_usage);
buffer->allocateBuffer(geom_count, index_count, TRUE);
}
else
{ //resize pre-existing buffer
- if (LLVertexBuffer::sEnableVBOs && buffer->getUsage() != group->mBufferUsage ||
+ if (LLVertexBuffer::sEnableVBOs && buffer->getUsage() != buffer_usage ||
buffer->getTypeMask() != mask)
{
- buffer = createVertexBuffer(mask,
- group->mBufferUsage);
+ buffer = createVertexBuffer(mask, buffer_usage);
buffer->allocateBuffer(geom_count, index_count, TRUE);
}
else
@@ -4896,11 +4907,6 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
{
registerFace(group, facep, LLRenderPass::PASS_ALPHA);
}
-
- if (LLPipeline::sRenderDeferred)
- {
- registerFace(group, facep, LLRenderPass::PASS_ALPHA_SHADOW);
- }
}
else if (gPipeline.canUseVertexShaders()
&& group->mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_HUD
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index d8e271811a..12bec90881 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -509,6 +509,92 @@ void LLPipeline::init()
mDeferredVB = new LLVertexBuffer(DEFERRED_VB_MASK, 0);
mDeferredVB->allocateBuffer(8, 0, true);
setLightingDetail(-1);
+
+ //
+ // Update all settings to trigger a cached settings refresh
+ //
+
+ gSavedSettings.getControl("RenderAutoMaskAlphaDeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderAutoMaskAlphaNonDeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderUseFarClip")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderAvatarMaxVisible")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderDelayVBUpdate")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+
+ gSavedSettings.getControl("UseOcclusion")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+
+ gSavedSettings.getControl("VertexShaderEnable")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderAvatarVP")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("WindLightUseAtmosShaders")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderDeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderDeferredSunWash")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderFSAASamples")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderResolutionDivisor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderUIBuffer")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowDetail")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderDeferredSSAO")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowResolutionScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderLocalLights")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderDelayCreation")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderAnimateRes")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("FreezeTime")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("DebugBeaconLineWidth")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderHighlightBrightness")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderHighlightColor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderHighlightThickness")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderSpotLightsInNondeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewAmbientColor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewDiffuse0")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewSpecular0")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewDiffuse1")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewSpecular1")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewDiffuse2")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewSpecular2")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewDirection0")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewDirection1")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewDirection2")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowMinLuminance")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowMaxExtractAlpha")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowWarmthAmount")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowLumWeights")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowWarmthWeights")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowResolutionPow")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowIterations")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowWidth")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowStrength")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderDepthOfField")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("CameraFocusTransitionTime")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("CameraFNumber")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("CameraFocalLength")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("CameraFieldOfView")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowNoise")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowBlurSize")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderSSAOScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderSSAOMaxScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderSSAOFactor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderSSAOEffect")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowOffsetError")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowBiasError")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowOffset")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowBias")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderSpotShadowOffset")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderSpotShadowBias")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderEdgeDepthCutoff")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderEdgeNormCutoff")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowGaussian")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowBlurDistFactor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderDeferredAtmospheric")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderReflectionDetail")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderHighlightFadeTime")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowClipPlanes")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowOrthoClipPlanes")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowNearDist")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderFarClip")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowSplitExponent")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowErrorCutoff")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowFOVCutoff")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("CameraOffset")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("CameraMaxCoF")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("CameraDoFResScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
}
LLPipeline::~LLPipeline()
@@ -707,7 +793,6 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
{
refreshCachedSettings();
- refreshRenderDeferred();
// remember these dimensions
mScreenWidth = resX;
@@ -840,12 +925,6 @@ void LLPipeline::updateRenderDeferred()
}
//static
-void LLPipeline::refreshRenderDeferred()
-{
- updateRenderDeferred();
-}
-
-//static
void LLPipeline::refreshCachedSettings()
{
LLPipeline::sAutoMaskAlphaDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaDeferred");
@@ -933,6 +1012,8 @@ void LLPipeline::refreshCachedSettings()
CameraOffset = gSavedSettings.getBOOL("CameraOffset");
CameraMaxCoF = gSavedSettings.getF32("CameraMaxCoF");
CameraDoFResScale = gSavedSettings.getF32("CameraDoFResScale");
+
+ updateRenderDeferred();
}
void LLPipeline::releaseGLBuffers()
@@ -6159,13 +6240,13 @@ void LLPipeline::resetVertexBuffers()
LLVertexBuffer::initClass(LLVertexBuffer::sEnableVBOs, LLVertexBuffer::sDisableVBOMapping);
}
-void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture)
+void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture, BOOL batch_texture)
{
LLMemType mt_ro(LLMemType::MTYPE_PIPELINE_RENDER_OBJECTS);
assertInitialized();
gGL.loadMatrix(gGLModelView);
gGLLastMatrix = NULL;
- mSimplePool->pushBatches(type, mask);
+ mSimplePool->pushBatches(type, mask, texture, batch_texture);
gGL.loadMatrix(gGLModelView);
gGLLastMatrix = NULL;
}
@@ -8195,7 +8276,14 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
}
LLPipeline::sShadowRender = TRUE;
- U32 types[] = { LLRenderPass::PASS_SIMPLE, LLRenderPass::PASS_FULLBRIGHT, LLRenderPass::PASS_SHINY, LLRenderPass::PASS_BUMP, LLRenderPass::PASS_FULLBRIGHT_SHINY };
+ U32 types[] = {
+ LLRenderPass::PASS_SIMPLE,
+ LLRenderPass::PASS_FULLBRIGHT,
+ LLRenderPass::PASS_SHINY,
+ LLRenderPass::PASS_BUMP,
+ LLRenderPass::PASS_FULLBRIGHT_SHINY
+ };
+
LLGLEnable cull(GL_CULL_FACE);
if (use_shader)
@@ -8267,7 +8355,15 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
LLFastTimer ftm(FTM_SHADOW_ALPHA);
gDeferredShadowAlphaMaskProgram.bind();
gDeferredShadowAlphaMaskProgram.setMinimumAlpha(0.598f);
- renderObjects(LLRenderPass::PASS_ALPHA_SHADOW, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR, TRUE);
+
+ U32 mask = LLVertexBuffer::MAP_VERTEX |
+ LLVertexBuffer::MAP_TEXCOORD0 |
+ LLVertexBuffer::MAP_COLOR |
+ LLVertexBuffer::MAP_TEXTURE_INDEX;
+
+ renderObjects(LLRenderPass::PASS_ALPHA_MASK, mask, TRUE, TRUE);
+ renderObjects(LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK, mask, TRUE, TRUE);
+ renderObjects(LLRenderPass::PASS_ALPHA, mask, TRUE, TRUE);
gDeferredTreeShadowProgram.bind();
gDeferredTreeShadowProgram.setMinimumAlpha(0.598f);
renderObjects(LLRenderPass::PASS_GRASS, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, TRUE);
@@ -8589,7 +8685,9 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
LLPipeline::RENDER_TYPE_TERRAIN,
LLPipeline::RENDER_TYPE_WATER,
LLPipeline::RENDER_TYPE_VOIDWATER,
- LLPipeline::RENDER_TYPE_PASS_ALPHA_SHADOW,
+ LLPipeline::RENDER_TYPE_PASS_ALPHA,
+ LLPipeline::RENDER_TYPE_PASS_ALPHA_MASK,
+ LLPipeline::RENDER_TYPE_PASS_FULLBRIGHT_ALPHA_MASK,
LLPipeline::RENDER_TYPE_PASS_GRASS,
LLPipeline::RENDER_TYPE_PASS_SIMPLE,
LLPipeline::RENDER_TYPE_PASS_BUMP,
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 8b6532ca25..2815d736e4 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -231,7 +231,7 @@ public:
void postSort(LLCamera& camera);
void forAllVisibleDrawables(void (*func)(LLDrawable*));
- void renderObjects(U32 type, U32 mask, BOOL texture = TRUE);
+ void renderObjects(U32 type, U32 mask, BOOL texture = TRUE, BOOL batch_texture = FALSE);
void renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture);
void grabReferences(LLCullResult& result);
@@ -359,7 +359,6 @@ public:
static BOOL getRenderHighlights(void* data);
static void updateRenderDeferred();
- static void refreshRenderDeferred();
static void refreshCachedSettings();
static void throttleNewMemoryAllocation(BOOL disable);
@@ -408,7 +407,6 @@ public:
RENDER_TYPE_PASS_ALPHA = LLRenderPass::PASS_ALPHA,
RENDER_TYPE_PASS_ALPHA_MASK = LLRenderPass::PASS_ALPHA_MASK,
RENDER_TYPE_PASS_FULLBRIGHT_ALPHA_MASK = LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK,
- RENDER_TYPE_PASS_ALPHA_SHADOW = LLRenderPass::PASS_ALPHA_SHADOW,
// Following are object types (only used in drawable mRenderType)
RENDER_TYPE_HUD = LLRenderPass::NUM_RENDER_TYPES,
RENDER_TYPE_VOLUME,