From 393c819477b268aa0a05ec0a006e1dba27d6e6c6 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Sun, 10 Oct 2010 15:25:11 +0100 Subject: VWR-21967 There's lots of ::renderForSelect() code that we don't need any more. VWR-22088 Remove underlying ::renderForSelect() code (render-pipeline) --- indra/newview/lldrawpool.h | 1 - indra/newview/lldrawpoolavatar.cpp | 73 ------------- indra/newview/lldrawpoolavatar.h | 1 - indra/newview/lldrawpoolclouds.cpp | 3 - indra/newview/lldrawpoolclouds.h | 1 - indra/newview/lldrawpoolground.cpp | 4 - indra/newview/lldrawpoolground.h | 1 - indra/newview/lldrawpoolsky.cpp | 4 - indra/newview/lldrawpoolsky.h | 1 - indra/newview/lldrawpoolterrain.cpp | 21 ---- indra/newview/lldrawpoolterrain.h | 1 - indra/newview/lldrawpooltree.cpp | 62 ----------- indra/newview/lldrawpooltree.h | 1 - indra/newview/lldrawpoolwater.cpp | 6 - indra/newview/lldrawpoolwater.h | 1 - indra/newview/llface.cpp | 78 ------------- indra/newview/llface.h | 1 - indra/newview/llfloatersnapshot.cpp | 2 - indra/newview/llglsandbox.cpp | 94 +++++++--------- indra/newview/llhudicon.cpp | 5 - indra/newview/llhudicon.h | 1 - indra/newview/llhudobject.cpp | 21 ---- indra/newview/llhudobject.h | 1 - indra/newview/llhudtext.cpp | 78 ++++--------- indra/newview/llhudtext.h | 3 +- indra/newview/llviewerjoint.cpp | 2 +- indra/newview/llviewerjointmesh.cpp | 27 +---- indra/newview/llviewerobjectlist.cpp | 28 ----- indra/newview/llviewerobjectlist.h | 1 - indra/newview/llviewerwindow.cpp | 29 ++--- indra/newview/llviewerwindow.h | 3 +- indra/newview/llviewerwindowlistener.cpp | 3 +- indra/newview/llvoavatar.cpp | 2 +- indra/newview/pipeline.cpp | 181 ------------------------------- indra/newview/pipeline.h | 2 - 35 files changed, 77 insertions(+), 666 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h index 221f81ec25..c69fee2bdf 100644 --- a/indra/newview/lldrawpool.h +++ b/indra/newview/lldrawpool.h @@ -167,7 +167,6 @@ public: LLFacePool(const U32 type); virtual ~LLFacePool(); - virtual void renderForSelect() = 0; BOOL isDead() { return mReferences.empty(); } virtual LLViewerTexture *getTexture(); diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 8cf4dc1b95..dbd5da31a6 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -743,79 +743,6 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) } } -//----------------------------------------------------------------------------- -// renderForSelect() -//----------------------------------------------------------------------------- -void LLDrawPoolAvatar::renderForSelect() -{ - - - if (mDrawFace.empty()) - { - return; - } - - const LLFace *facep = mDrawFace[0]; - if (!facep->getDrawable()) - { - return; - } - LLVOAvatar *avatarp = (LLVOAvatar *)facep->getDrawable()->getVObj().get(); - - if (avatarp->isDead() || avatarp->mIsDummy || avatarp->mDrawable.isNull()) - { - return; - } - - S32 curr_shader_level = getVertexShaderLevel(); - S32 name = avatarp->mDrawable->getVObj()->mGLName; - LLColor4U color((U8)(name >> 16), (U8)(name >> 8), (U8)name); - - BOOL impostor = avatarp->isImpostor(); - if (impostor) - { - gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_VERT_COLOR); - gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA); - - avatarp->renderImpostor(color); - - gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); - return; - } - - sVertexProgram = &gAvatarPickProgram; - if (curr_shader_level > 0) - { - gAvatarMatrixParam = sVertexProgram->mUniform[LLViewerShaderMgr::AVATAR_MATRIX]; - } - gGL.setAlphaRejectSettings(LLRender::CF_GREATER_EQUAL, 0.2f); - gGL.setSceneBlendType(LLRender::BT_REPLACE); - - glColor4ubv(color.mV); - - if (curr_shader_level > 0) // for hardware blending - { - sRenderingSkinned = TRUE; - sVertexProgram->bind(); - enable_vertex_weighting(sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_WEIGHT]); - } - - avatarp->renderSkinned(AVATAR_RENDER_PASS_SINGLE); - - // if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done - if (curr_shader_level > 0) - { - sRenderingSkinned = FALSE; - sVertexProgram->unbind(); - disable_vertex_weighting(sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_WEIGHT]); - } - - gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); - gGL.setSceneBlendType(LLRender::BT_ALPHA); - - // restore texture mode - gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); -} //----------------------------------------------------------------------------- // getDebugTexture() diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h index c46fed824e..f536d3c911 100644 --- a/indra/newview/lldrawpoolavatar.h +++ b/indra/newview/lldrawpoolavatar.h @@ -64,7 +64,6 @@ public: /*virtual*/ void endRenderPass(S32 pass); /*virtual*/ void prerender(); /*virtual*/ void render(S32 pass = 0); - /*virtual*/ void renderForSelect(); /*virtual*/ S32 getNumDeferredPasses(); /*virtual*/ void beginDeferredPass(S32 pass); diff --git a/indra/newview/lldrawpoolclouds.cpp b/indra/newview/lldrawpoolclouds.cpp index f7da144671..5db1d8cfed 100644 --- a/indra/newview/lldrawpoolclouds.cpp +++ b/indra/newview/lldrawpoolclouds.cpp @@ -95,6 +95,3 @@ void LLDrawPoolClouds::render(S32 pass) } -void LLDrawPoolClouds::renderForSelect() -{ -} diff --git a/indra/newview/lldrawpoolclouds.h b/indra/newview/lldrawpoolclouds.h index 548720ed9c..019f11a795 100644 --- a/indra/newview/lldrawpoolclouds.h +++ b/indra/newview/lldrawpoolclouds.h @@ -49,7 +49,6 @@ public: /*virtual*/ void enqueue(LLFace *face); /*virtual*/ void beginRenderPass(S32 pass); /*virtual*/ void render(S32 pass = 0); - /*virtual*/ void renderForSelect(); }; #endif // LL_LLDRAWPOOLSKY_H diff --git a/indra/newview/lldrawpoolground.cpp b/indra/newview/lldrawpoolground.cpp index e950fbfa82..bb7c55e931 100644 --- a/indra/newview/lldrawpoolground.cpp +++ b/indra/newview/lldrawpoolground.cpp @@ -85,7 +85,3 @@ void LLDrawPoolGround::render(S32 pass) glPopMatrix(); } -void LLDrawPoolGround::renderForSelect() -{ -} - diff --git a/indra/newview/lldrawpoolground.h b/indra/newview/lldrawpoolground.h index c6c7cbf964..a4f8a3fcf5 100644 --- a/indra/newview/lldrawpoolground.h +++ b/indra/newview/lldrawpoolground.h @@ -47,7 +47,6 @@ public: /*virtual*/ void prerender(); /*virtual*/ void render(S32 pass = 0); - /*virtual*/ void renderForSelect(); }; #endif // LL_LLDRAWPOOLGROUND_H diff --git a/indra/newview/lldrawpoolsky.cpp b/indra/newview/lldrawpoolsky.cpp index d811ab8c54..41ea8d73b3 100644 --- a/indra/newview/lldrawpoolsky.cpp +++ b/indra/newview/lldrawpoolsky.cpp @@ -143,10 +143,6 @@ void LLDrawPoolSky::renderSkyCubeFace(U8 side) } } -void LLDrawPoolSky::renderForSelect() -{ -} - void LLDrawPoolSky::endRenderPass( S32 pass ) { } diff --git a/indra/newview/lldrawpoolsky.h b/indra/newview/lldrawpoolsky.h index 15d643c886..098bd2134a 100644 --- a/indra/newview/lldrawpoolsky.h +++ b/indra/newview/lldrawpoolsky.h @@ -58,7 +58,6 @@ public: /*virtual*/ void prerender(); /*virtual*/ void render(S32 pass = 0); - /*virtual*/ void renderForSelect(); /*virtual*/ void endRenderPass(S32 pass); void setSkyTex(LLSkyTex* const st) { mSkyTex = st; } diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index 3dede9d8fc..84eeace9c6 100644 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -899,27 +899,6 @@ void LLDrawPoolTerrain::renderOwnership() } -void LLDrawPoolTerrain::renderForSelect() -{ - if (mDrawFace.empty()) - { - return; - } - - - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - - for (std::vector::iterator iter = mDrawFace.begin(); - iter != mDrawFace.end(); iter++) - { - LLFace *facep = *iter; - if (!facep->getDrawable()->isDead() && (facep->getDrawable()->getVObj()->mGLName)) - { - facep->renderForSelect(LLVertexBuffer::MAP_VERTEX); - } - } -} - void LLDrawPoolTerrain::dirtyTextures(const std::set& textures) { LLViewerFetchedTexture* tex = LLViewerTextureManager::staticCastToFetchedTexture(mTexturep) ; diff --git a/indra/newview/lldrawpoolterrain.h b/indra/newview/lldrawpoolterrain.h index 730298609d..3056da44d5 100644 --- a/indra/newview/lldrawpoolterrain.h +++ b/indra/newview/lldrawpoolterrain.h @@ -66,7 +66,6 @@ public: /*virtual*/ void prerender(); /*virtual*/ void beginRenderPass( S32 pass ); /*virtual*/ void endRenderPass( S32 pass ); - /*virtual*/ void renderForSelect(); /*virtual*/ void dirtyTextures(const std::set& textures); /*virtual*/ LLViewerTexture *getTexture(); /*virtual*/ LLViewerTexture *getDebugTexture(); diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index 09cca8b73c..f1198c9a8d 100644 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -183,68 +183,6 @@ void LLDrawPoolTree::endShadowPass(S32 pass) } -void LLDrawPoolTree::renderForSelect() -{ - if (mDrawFace.empty()) - { - return; - } - - LLOverrideFaceColor color(this, 1.f, 1.f, 1.f, 1.f); - - LLGLSObjectSelectAlpha gls_alpha; - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - - gGL.setSceneBlendType(LLRender::BT_REPLACE); - gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); - - gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); - gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA); - - if (gSavedSettings.getBOOL("RenderAnimateTrees")) - { - renderTree(TRUE); - } - else - { - gGL.getTexUnit(sDiffTex)->bind(mTexturep); - - for (std::vector::iterator iter = mDrawFace.begin(); - iter != mDrawFace.end(); iter++) - { - LLFace *face = *iter; - LLDrawable *drawablep = face->getDrawable(); - - if (drawablep->isDead() || face->mVertexBuffer.isNull()) - { - continue; - } - - // Render each of the trees - LLVOTree *treep = (LLVOTree *)drawablep->getVObj().get(); - - LLColor4U color(255,255,255,255); - - if (treep->mGLName != 0) - { - S32 name = treep->mGLName; - color = LLColor4U((U8)(name >> 16), (U8)(name >> 8), (U8)name, 255); - - LLFacePool::LLOverrideFaceColor col(this, color); - - face->mVertexBuffer->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK); - face->mVertexBuffer->drawRange(LLRender::TRIANGLES, 0, face->mVertexBuffer->getRequestedVerts()-1, face->mVertexBuffer->getRequestedIndices(), 0); - gPipeline.addTrianglesDrawn(face->mVertexBuffer->getRequestedIndices()); - } - } - } - - gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); - gGL.setSceneBlendType(LLRender::BT_ALPHA); - - gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); -} - void LLDrawPoolTree::renderTree(BOOL selecting) { LLGLState normalize(GL_NORMALIZE, TRUE); diff --git a/indra/newview/lldrawpooltree.h b/indra/newview/lldrawpooltree.h index cebe41f75f..ddb259bb82 100644 --- a/indra/newview/lldrawpooltree.h +++ b/indra/newview/lldrawpooltree.h @@ -62,7 +62,6 @@ public: /*virtual*/ void render(S32 pass = 0); /*virtual*/ void endRenderPass( S32 pass ); /*virtual*/ S32 getNumPasses() { return 1; } - /*virtual*/ void renderForSelect(); /*virtual*/ BOOL verify() const; /*virtual*/ LLViewerTexture *getTexture(); /*virtual*/ LLViewerTexture *getDebugTexture(); diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index ce1b899d55..c20e1f9a26 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -601,12 +601,6 @@ void LLDrawPoolWater::shade() } -void LLDrawPoolWater::renderForSelect() -{ - // Can't select water! - return; -} - LLViewerTexture *LLDrawPoolWater::getDebugTexture() { return LLViewerFetchedTexture::sSmokeImagep; diff --git a/indra/newview/lldrawpoolwater.h b/indra/newview/lldrawpoolwater.h index 3ab4bc5e2c..2648a5276c 100644 --- a/indra/newview/lldrawpoolwater.h +++ b/indra/newview/lldrawpoolwater.h @@ -74,7 +74,6 @@ public: /*virtual*/ S32 getNumPasses(); /*virtual*/ void render(S32 pass = 0); /*virtual*/ void prerender(); - /*virtual*/ void renderForSelect(); /*virtual*/ LLViewerTexture *getDebugTexture(); /*virtual*/ LLColor3 getDebugColor() const; // For AGP debug display diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index d22950cad3..2471da9da5 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -399,84 +399,6 @@ void LLFace::updateCenterAgent() } } -void LLFace::renderForSelect(U32 data_mask) -{ - if(mDrawablep.isNull() || mVertexBuffer.isNull()) - { - return; - } - - LLSpatialGroup* group = mDrawablep->getSpatialGroup(); - if (!group || group->isState(LLSpatialGroup::GEOM_DIRTY)) - { - return; - } - - if (mVObjp->mGLName) - { - S32 name = mVObjp->mGLName; - - LLColor4U color((U8)(name >> 16), (U8)(name >> 8), (U8)name); -#if 0 // *FIX: Postponing this fix until we have texcoord pick info... - if (mTEOffset != -1) - { - color.mV[VALPHA] = (U8)(getTextureEntry()->getColor().mV[VALPHA] * 255.f); - } -#endif - glColor4ubv(color.mV); - - if (!getPool()) - { - switch (getPoolType()) - { - case LLDrawPool::POOL_ALPHA: - gGL.getTexUnit(0)->bind(getTexture()); - break; - default: - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - break; - } - } - - mVertexBuffer->setBuffer(data_mask); -#if !LL_RELEASE_FOR_DOWNLOAD - LLGLState::checkClientArrays("", data_mask); -#endif - if (mTEOffset != -1) - { - // mask off high 4 bits (16 total possible faces) - color.mV[0] &= 0x0f; - color.mV[0] |= (mTEOffset & 0x0f) << 4; - glColor4ubv(color.mV); - } - - if (mIndicesCount) - { - if (isState(GLOBAL)) - { - if (mDrawablep->getVOVolume()) - { - glPushMatrix(); - glMultMatrixf((float*) mDrawablep->getRegion()->mRenderMatrix.mMatrix); - mVertexBuffer->draw(LLRender::TRIANGLES, mIndicesCount, mIndicesIndex); - glPopMatrix(); - } - else - { - mVertexBuffer->draw(LLRender::TRIANGLES, mIndicesCount, mIndicesIndex); - } - } - else - { - glPushMatrix(); - glMultMatrixf((float*)getRenderMatrix().mMatrix); - mVertexBuffer->draw(LLRender::TRIANGLES, mIndicesCount, mIndicesIndex); - glPopMatrix(); - } - } - } -} - void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color) { if (mDrawablep->getSpatialGroup() == NULL) diff --git a/indra/newview/llface.h b/indra/newview/llface.h index 0166e45bee..6c941bd092 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -173,7 +173,6 @@ public: void updateCenterAgent(); // Update center when xform has changed. void renderSelectedUV(); - void renderForSelect(U32 data_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0); void renderSelected(LLViewerTexture *image, const LLColor4 &color); F32 getKey() const { return mDistance; } diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 36e8ad9dfc..51ee38bd65 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1212,8 +1212,6 @@ LLViewerWindow::ESnapshotType LLFloaterSnapshot::Impl::getLayerType(LLFloaterSna type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; else if (id == "depth") type = LLViewerWindow::SNAPSHOT_TYPE_DEPTH; - else if (id == "objects") - type = LLViewerWindow::SNAPSHOT_TYPE_OBJECT_ID; return type; } diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 83846f5b61..aab88e9779 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -662,35 +662,27 @@ void LLViewerParcelMgr::renderCollisionSegments(U8* segments, BOOL use_pass, LLV x2 = x1 + PARCEL_GRID_STEP_METERS; y2 = y1; - if (gRenderForSelect) - { - LLColor4U color((U8)(GL_NAME_PARCEL_WALL >> 16), (U8)(GL_NAME_PARCEL_WALL >> 8), (U8)GL_NAME_PARCEL_WALL); - gGL.color4ubv(color.mV); - } - else - { - dy = (pos_y - y1) + DIST_OFFSET; - - if (pos_x < x1) - dx = pos_x - x1; - else if (pos_x > x2) - dx = pos_x - x2; - else - dx = 0; + dy = (pos_y - y1) + DIST_OFFSET; - dist = dx*dx+dy*dy; - - if (dist < MIN_DIST_SQ) - alpha = MAX_ALPHA; - else if (dist > MAX_DIST_SQ) - alpha = 0.0f; - else - alpha = 30/dist; - - alpha = llclamp(alpha, 0.0f, MAX_ALPHA); - - gGL.color4f(1.f, 1.f, 1.f, alpha); - } + if (pos_x < x1) + dx = pos_x - x1; + else if (pos_x > x2) + dx = pos_x - x2; + else + dx = 0; + + dist = dx*dx+dy*dy; + + if (dist < MIN_DIST_SQ) + alpha = MAX_ALPHA; + else if (dist > MAX_DIST_SQ) + alpha = 0.0f; + else + alpha = 30/dist; + + alpha = llclamp(alpha, 0.0f, MAX_ALPHA); + + gGL.color4f(1.f, 1.f, 1.f, alpha); if ((pos_y - y1) < 0) direction = SOUTH_MASK; else direction = NORTH_MASK; @@ -708,35 +700,27 @@ void LLViewerParcelMgr::renderCollisionSegments(U8* segments, BOOL use_pass, LLV x2 = x1; y2 = y1 + PARCEL_GRID_STEP_METERS; - if (gRenderForSelect) - { - LLColor4U color((U8)(GL_NAME_PARCEL_WALL >> 16), (U8)(GL_NAME_PARCEL_WALL >> 8), (U8)GL_NAME_PARCEL_WALL); - gGL.color4ubv(color.mV); - } + dx = (pos_x - x1) + DIST_OFFSET; + + if (pos_y < y1) + dy = pos_y - y1; + else if (pos_y > y2) + dy = pos_y - y2; + else + dy = 0; + + dist = dx*dx+dy*dy; + + if (dist < MIN_DIST_SQ) + alpha = MAX_ALPHA; + else if (dist > MAX_DIST_SQ) + alpha = 0.0f; else - { - dx = (pos_x - x1) + DIST_OFFSET; - - if (pos_y < y1) - dy = pos_y - y1; - else if (pos_y > y2) - dy = pos_y - y2; - else - dy = 0; - - dist = dx*dx+dy*dy; - - if (dist < MIN_DIST_SQ) - alpha = MAX_ALPHA; - else if (dist > MAX_DIST_SQ) - alpha = 0.0f; - else - alpha = 30/dist; - - alpha = llclamp(alpha, 0.0f, MAX_ALPHA); + alpha = 30/dist; + + alpha = llclamp(alpha, 0.0f, MAX_ALPHA); - gGL.color4f(1.f, 1.f, 1.f, alpha); - } + gGL.color4f(1.f, 1.f, 1.f, alpha); if ((pos_x - x1) > 0) direction = WEST_MASK; else direction = EAST_MASK; diff --git a/indra/newview/llhudicon.cpp b/indra/newview/llhudicon.cpp index aea8c5928b..568b0ae585 100644 --- a/indra/newview/llhudicon.cpp +++ b/indra/newview/llhudicon.cpp @@ -201,11 +201,6 @@ void LLHUDIcon::render() renderIcon(FALSE); } -void LLHUDIcon::renderForSelect() -{ - renderIcon(TRUE); -} - BOOL LLHUDIcon::lineSegmentIntersect(const LLVector3& start, const LLVector3& end, LLVector3* intersection) { if (mHidden) diff --git a/indra/newview/llhudicon.h b/indra/newview/llhudicon.h index 7712ebac1a..c0e6169eae 100644 --- a/indra/newview/llhudicon.h +++ b/indra/newview/llhudicon.h @@ -51,7 +51,6 @@ friend class LLHUDObject; public: /*virtual*/ void render(); - /*virtual*/ void renderForSelect(); /*virtual*/ void markDead(); /*virtual*/ F32 getDistance() const { return mDistance; } diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index 3e814a0773..b74f719b16 100644 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -283,27 +283,6 @@ void LLHUDObject::renderAll() LLVertexBuffer::unbind(); } -// static -void LLHUDObject::renderAllForSelect() -{ - LLHUDObject *hud_objp; - - hud_object_list_t::iterator object_it; - for (object_it = sHUDObjects.begin(); object_it != sHUDObjects.end(); ) - { - hud_object_list_t::iterator cur_it = object_it++; - hud_objp = (*cur_it); - if (hud_objp->getNumRefs() == 1) - { - sHUDObjects.erase(cur_it); - } - else if (hud_objp->isVisible()) - { - hud_objp->renderForSelect(); - } - } -} - // static void LLHUDObject::renderAllForTimer() { diff --git a/indra/newview/llhudobject.h b/indra/newview/llhudobject.h index 97145b9a84..36f809eca2 100644 --- a/indra/newview/llhudobject.h +++ b/indra/newview/llhudobject.h @@ -100,7 +100,6 @@ protected: ~LLHUDObject(); virtual void render() = 0; - virtual void renderForSelect() {}; virtual void renderForTimer() {}; protected: diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 96638018c4..8e44678924 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -222,44 +222,21 @@ void LLHUDText::render() if (!mOnHUDAttachment && sDisplayText) { LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); - renderText(FALSE); + renderText(); } } -void LLHUDText::renderForSelect() -{ - if (!mOnHUDAttachment) - { - LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); - renderText(TRUE); - } -} - -void LLHUDText::renderText(BOOL for_select) +void LLHUDText::renderText() { if (!mVisible || mHidden) { return; } - // don't pick text that isn't bound to a viewerobject or isn't in a bubble - if (for_select && - (!mSourceObject || mSourceObject->mDrawable.isNull() || !mUseBubble)) - { - return; - } - - if (for_select) - { - gGL.getTexUnit(0)->disable(); - } - else - { - gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE); - } + gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE); - LLGLState gls_blend(GL_BLEND, for_select ? FALSE : TRUE); - LLGLState gls_alpha(GL_ALPHA_TEST, for_select ? FALSE : TRUE); + LLGLState gls_blend(GL_BLEND, TRUE); + LLGLState gls_alpha(GL_ALPHA_TEST, TRUE); LLColor4 shadow_color(0.f, 0.f, 0.f, 1.f); F32 alpha_factor = 1.f; @@ -364,35 +341,22 @@ void LLHUDText::renderText(BOOL for_select) - (height_vec); LLUI::translate(bg_pos.mV[VX], bg_pos.mV[VY], bg_pos.mV[VZ]); - if (for_select) - { - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - S32 name = mSourceObject->mGLName; - LLColor4U coloru((U8)(name >> 16), (U8)(name >> 8), (U8)name); - gGL.color4ubv(coloru.mV); - gl_segmented_rect_3d_tex(border_scale_vec, scaled_border_width, scaled_border_height, width_vec, height_vec); - LLUI::popMatrix(); - return; - } - else + gGL.getTexUnit(0)->bind(imagep->getImage()); + + gGL.color4fv(bg_color.mV); + gl_segmented_rect_3d_tex(border_scale_vec, scaled_border_width, scaled_border_height, width_vec, height_vec); + + if ( mLabelSegments.size()) { - gGL.getTexUnit(0)->bind(imagep->getImage()); - - gGL.color4fv(bg_color.mV); - gl_segmented_rect_3d_tex(border_scale_vec, scaled_border_width, scaled_border_height, width_vec, height_vec); - - if ( mLabelSegments.size()) + LLUI::pushMatrix(); { - LLUI::pushMatrix(); - { - gGL.color4f(text_color.mV[VX], text_color.mV[VY], text_color.mV[VZ], gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor); - LLVector3 label_height = (mFontp->getLineHeight() * mLabelSegments.size() + (VERTICAL_PADDING / 3.f)) * y_pixel_vec; - LLVector3 label_offset = height_vec - label_height; - LLUI::translate(label_offset.mV[VX], label_offset.mV[VY], label_offset.mV[VZ]); - gl_segmented_rect_3d_tex_top(border_scale_vec, scaled_border_width, scaled_border_height, width_vec, label_height); - } - LLUI::popMatrix(); + gGL.color4f(text_color.mV[VX], text_color.mV[VY], text_color.mV[VZ], gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor); + LLVector3 label_height = (mFontp->getLineHeight() * mLabelSegments.size() + (VERTICAL_PADDING / 3.f)) * y_pixel_vec; + LLVector3 label_offset = height_vec - label_height; + LLUI::translate(label_offset.mV[VX], label_offset.mV[VY], label_offset.mV[VZ]); + gl_segmented_rect_3d_tex_top(border_scale_vec, scaled_border_width, scaled_border_height, width_vec, label_height); } + LLUI::popMatrix(); } BOOL outside_width = llabs(mPositionOffset.mV[VX]) > mWidth * 0.5f; @@ -550,10 +514,6 @@ void LLHUDText::renderText(BOOL for_select) } /// Reset the default color to white. The renderer expects this to be the default. gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f); - if (for_select) - { - gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE); - } } void LLHUDText::setStringUTF8(const std::string &wtext) @@ -1051,7 +1011,7 @@ void LLHUDText::renderAllHUD() for (text_it = sVisibleHUDTextObjects.begin(); text_it != sVisibleHUDTextObjects.end(); ++text_it) { - (*text_it)->renderText(FALSE); + (*text_it)->renderText(); } } diff --git a/indra/newview/llhudtext.h b/indra/newview/llhudtext.h index 4f4ee55a61..637e2c930f 100644 --- a/indra/newview/llhudtext.h +++ b/indra/newview/llhudtext.h @@ -129,8 +129,7 @@ protected: LLHUDText(const U8 type); /*virtual*/ void render(); - /*virtual*/ void renderForSelect(); - void renderText(BOOL for_select); + void renderText(); static void updateAll(); void setLOD(S32 lod); S32 getMaxLines(); diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp index 0cf5fe0ada..baf85d6884 100644 --- a/indra/newview/llviewerjoint.cpp +++ b/indra/newview/llviewerjoint.cpp @@ -257,7 +257,7 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy ) // if object is transparent, defer it, otherwise // give the joint subclass a chance to draw itself //---------------------------------------------------------------- - if ( gRenderForSelect || is_dummy ) + if ( is_dummy ) { triangle_count += drawShape( pixelArea, first_pass, is_dummy ); } diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index ae2aa41b3a..e59e685f53 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -61,7 +61,6 @@ extern PFNGLWEIGHTPOINTERARBPROC glWeightPointerARB; extern PFNGLWEIGHTFVARBPROC glWeightfvARB; extern PFNGLVERTEXBLENDARBPROC glVertexBlendARB; #endif -extern BOOL gRenderForSelect; static LLPointer sRenderBuffer = NULL; static const U32 sRenderMask = LLVertexBuffer::MAP_VERTEX | @@ -515,17 +514,14 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) //---------------------------------------------------------------- // setup current color //---------------------------------------------------------------- - if (!gRenderForSelect) - { - if (is_dummy) - glColor4fv(LLVOAvatar::getDummyColor().mV); - else - glColor4fv(mColor.mV); - } + if (is_dummy) + glColor4fv(LLVOAvatar::getDummyColor().mV); + else + glColor4fv(mColor.mV); stop_glerror(); - LLGLSSpecular specular(LLColor4(1.f,1.f,1.f,1.f), gRenderForSelect ? 0.0f : mShiny && !(mFace->getPool()->getVertexShaderLevel() > 0)); + LLGLSSpecular specular(LLColor4(1.f,1.f,1.f,1.f), mShiny && !(mFace->getPool()->getVertexShaderLevel() > 0)); //---------------------------------------------------------------- // setup current texture @@ -580,19 +576,6 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) gGL.getTexUnit(0)->bind(LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT)); } - if (gRenderForSelect) - { - if (isTransparent()) - { - gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); - gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_CONST_ALPHA); - } - else - { - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - } - } - mFace->mVertexBuffer->setBuffer(sRenderMask); U32 start = mMesh->mFaceVertexOffset; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 05695193a5..d3232043ae 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1269,34 +1269,6 @@ void LLViewerObjectList::generatePickList(LLCamera &camera) } } -void LLViewerObjectList::renderPickList(const LLRect& screen_rect, BOOL pick_parcel_wall, BOOL render_transparent) -{ - gRenderForSelect = TRUE; - - gPipeline.renderForSelect(mSelectPickList, render_transparent, screen_rect); - - // - // Render pass for selected objects - // - gGL.color4f(1,1,1,1); - gViewerWindow->renderSelections( TRUE, pick_parcel_wall, FALSE ); - - //fix for DEV-19335. Don't pick hud objects when customizing avatar (camera mode doesn't play nice with nametags). - if (!gAgentCamera.cameraCustomizeAvatar()) - { - // render pickable ui elements, like names, etc. - LLHUDObject::renderAllForSelect(); - } - - gGL.flush(); - LLVertexBuffer::unbind(); - - gRenderForSelect = FALSE; - - //llinfos << "Rendered " << count << " for select" << llendl; - //llinfos << "Took " << pick_timer.getElapsedTimeF32()*1000.f << "ms to pick" << llendl; -} - LLViewerObject *LLViewerObjectList::getSelectedObject(const U32 object_id) { std::set::iterator pick_it; diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index eba5584b57..605bac8e89 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -104,7 +104,6 @@ public: // Selection related stuff void generatePickList(LLCamera &camera); - void renderPickList(const LLRect& screen_rect, BOOL pick_parcel_wall, BOOL render_transparent); LLViewerObject *getSelectedObject(const U32 object_id); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 983a2d25c8..a7cca4c532 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3986,29 +3986,18 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei { gDisplaySwapBuffers = FALSE; gDepthDirty = TRUE; - if (type == SNAPSHOT_TYPE_OBJECT_ID) - { - glClearColor(0.f, 0.f, 0.f, 0.f); - glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); - LLViewerCamera::getInstance()->setZoomParameters(scale_factor, subimage_x+(subimage_y*llceil(scale_factor))); - setup3DRender(); - gObjectList.renderPickList(gViewerWindow->getWindowRectScaled(), FALSE, FALSE); + const U32 subfield = subimage_x+(subimage_y*llceil(scale_factor)); + + if (LLPipeline::sRenderDeferred) + { + display(do_rebuild, scale_factor, subfield, FALSE); } else { - const U32 subfield = subimage_x+(subimage_y*llceil(scale_factor)); - - if (LLPipeline::sRenderDeferred) - { - display(do_rebuild, scale_factor, subfield, FALSE); - } - else - { - display(do_rebuild, scale_factor, subfield, TRUE); - // Required for showing the GUI in snapshots? See DEV-16350 for details. JC - render_ui(scale_factor, subfield); - } + display(do_rebuild, scale_factor, subfield, TRUE); + // Required for showing the GUI in snapshots? See DEV-16350 for details. JC + render_ui(scale_factor, subfield); } S32 subimage_x_offset = llclamp(buffer_x_offset - (subimage_x * window_width), 0, window_width); @@ -4031,7 +4020,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei LLAppViewer::instance()->pingMainloopTimeout("LLViewerWindow::rawSnapshot"); } - if (type == SNAPSHOT_TYPE_OBJECT_ID || type == SNAPSHOT_TYPE_COLOR) + if (type == SNAPSHOT_TYPE_COLOR) { glReadPixels( subimage_x_offset, out_y + subimage_y_offset, diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 633c3a41d2..47fb7c4883 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -316,8 +316,7 @@ public: typedef enum { SNAPSHOT_TYPE_COLOR, - SNAPSHOT_TYPE_DEPTH, - SNAPSHOT_TYPE_OBJECT_ID + SNAPSHOT_TYPE_DEPTH } ESnapshotType; BOOL saveSnapshot(const std::string& filename, S32 image_width, S32 image_height, BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, ESnapshotType type = SNAPSHOT_TYPE_COLOR); BOOL rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, BOOL keep_window_aspect = TRUE, BOOL is_texture = FALSE, diff --git a/indra/newview/llviewerwindowlistener.cpp b/indra/newview/llviewerwindowlistener.cpp index 4473b5820d..0b52948680 100644 --- a/indra/newview/llviewerwindowlistener.cpp +++ b/indra/newview/llviewerwindowlistener.cpp @@ -54,7 +54,7 @@ LLViewerWindowListener::LLViewerWindowListener(LLViewerWindow* llviewerwindow): // saveSnapshotArgs["type"] = LLSD::String(); add("saveSnapshot", "Save screenshot: [\"filename\"], [\"width\"], [\"height\"], [\"showui\"], [\"rebuild\"], [\"type\"]\n" - "type: \"COLOR\", \"DEPTH\", \"OBJECT_ID\"\n" + "type: \"COLOR\", \"DEPTH\"\n" "Post on [\"reply\"] an event containing [\"ok\"]", &LLViewerWindowListener::saveSnapshot, saveSnapshotArgs); @@ -71,7 +71,6 @@ void LLViewerWindowListener::saveSnapshot(const LLSD& event) const #define tp(name) types[#name] = LLViewerWindow::SNAPSHOT_TYPE_##name tp(COLOR); tp(DEPTH); - tp(OBJECT_ID); #undef tp // Our add() call should ensure that the incoming LLSD does in fact // contain our required arguments. Deal with the optional ones. diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index c31714de5a..4e37e7df69 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3855,7 +3855,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass) // *NOTE: this is disabled (there is no UI for enabling sShowFootPlane) due // to DEV-14477. the code is left here to aid in tracking down the cause // of the crash in the future. -brad - if (!gRenderForSelect && sShowFootPlane && mDrawable.notNull()) + if (sShowFootPlane && mDrawable.notNull()) { LLVector3 slaved_pos = mDrawable->getPositionAgent(); LLVector3 foot_plane_normal(mFootPlane.mV[VX], mFootPlane.mV[VY], mFootPlane.mV[VZ]); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e69b0a2996..a883f24c4f 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -128,8 +128,6 @@ static S32 sDelayedVBOEnable = 0; BOOL gAvatarBacklight = FALSE; -BOOL gRenderForSelect = FALSE; - BOOL gDebugPipeline = FALSE; LLPipeline gPipeline; const LLMatrix4* gGLLastMatrix = NULL; @@ -3805,185 +3803,6 @@ void LLPipeline::renderDebug() gGL.flush(); } -void LLPipeline::renderForSelect(std::set& objects, BOOL render_transparent, const LLRect& screen_rect) -{ - assertInitialized(); - - gGL.setColorMask(true, false); - gPipeline.resetDrawOrders(); - - LLViewerCamera* camera = LLViewerCamera::getInstance(); - for (std::set::iterator iter = objects.begin(); iter != objects.end(); ++iter) - { - stateSort((*iter)->mDrawable, *camera); - } - - LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_SELECT); - - - - glMatrixMode(GL_MODELVIEW); - - LLGLSDefault gls_default; - LLGLSObjectSelect gls_object_select; - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - LLGLDepthTest gls_depth(GL_TRUE,GL_TRUE); - disableLights(); - - LLVertexBuffer::unbind(); - - //for each drawpool - LLGLState::checkStates(); - LLGLState::checkTextureChannels(); - LLGLState::checkClientArrays(); - U32 last_type = 0; - - // If we don't do this, we crash something on changing graphics settings - // from Medium -> Low, because we unload all the shaders and the - // draw pools aren't aware. I don't know if this has to be a separate - // loop before actual rendering. JC - for (pool_set_t::iterator iter = mPools.begin(); iter != mPools.end(); ++iter) - { - LLDrawPool *poolp = *iter; - if (poolp->isFacePool() && hasRenderType(poolp->getType())) - { - poolp->prerender(); - } - } - for (pool_set_t::iterator iter = mPools.begin(); iter != mPools.end(); ++iter) - { - LLDrawPool *poolp = *iter; - if (poolp->isFacePool() && hasRenderType(poolp->getType())) - { - LLFacePool* face_pool = (LLFacePool*) poolp; - face_pool->renderForSelect(); - LLVertexBuffer::unbind(); - gGLLastMatrix = NULL; - glLoadMatrixd(gGLModelView); - - if (poolp->getType() != last_type) - { - last_type = poolp->getType(); - LLGLState::checkStates(); - LLGLState::checkTextureChannels(); - LLGLState::checkClientArrays(); - } - } - } - - LLGLEnable alpha_test(GL_ALPHA_TEST); - if (render_transparent) - { - gGL.setAlphaRejectSettings(LLRender::CF_GREATER_EQUAL, 0.f); - } - else - { - gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.2f); - } - - gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_VERT_COLOR); - gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA); - - U32 prim_mask = LLVertexBuffer::MAP_VERTEX | - LLVertexBuffer::MAP_TEXCOORD0; - - for (std::set::iterator i = objects.begin(); i != objects.end(); ++i) - { - LLViewerObject* vobj = *i; - LLDrawable* drawable = vobj->mDrawable; - if (vobj->isDead() || - vobj->isHUDAttachment() || - (LLSelectMgr::getInstance()->mHideSelectedObjects && vobj->isSelected()) || - drawable->isDead() || - !hasRenderType(drawable->getRenderType())) - { - continue; - } - - for (S32 j = 0; j < drawable->getNumFaces(); ++j) - { - LLFace* facep = drawable->getFace(j); - if (!facep->getPool()) - { - facep->renderForSelect(prim_mask); - } - } - } - - // pick HUD objects - if (isAgentAvatarValid() && sShowHUDAttachments) - { - glh::matrix4f save_proj(glh_get_current_projection()); - glh::matrix4f save_model(glh_get_current_modelview()); - - setup_hud_matrices(screen_rect); - for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); - iter != gAgentAvatarp->mAttachmentPoints.end(); ) - { - LLVOAvatar::attachment_map_t::iterator curiter = iter++; - LLViewerJointAttachment* attachment = curiter->second; - if (attachment->getIsHUDAttachment()) - { - for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin(); - attachment_iter != attachment->mAttachedObjects.end(); - ++attachment_iter) - { - if (LLViewerObject* attached_object = (*attachment_iter)) - { - LLDrawable* drawable = attached_object->mDrawable; - if (drawable->isDead()) - { - continue; - } - - for (S32 j = 0; j < drawable->getNumFaces(); ++j) - { - LLFace* facep = drawable->getFace(j); - if (!facep->getPool()) - { - facep->renderForSelect(prim_mask); - } - } - - //render child faces - LLViewerObject::const_child_list_t& child_list = attached_object->getChildren(); - for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); - iter != child_list.end(); iter++) - { - LLViewerObject* child = *iter; - LLDrawable* child_drawable = child->mDrawable; - for (S32 l = 0; l < child_drawable->getNumFaces(); ++l) - { - LLFace* facep = child_drawable->getFace(l); - if (!facep->getPool()) - { - facep->renderForSelect(prim_mask); - } - } - } - } - } - } - } - - glMatrixMode(GL_PROJECTION); - glLoadMatrixf(save_proj.m); - glh_set_current_projection(save_proj); - - glMatrixMode(GL_MODELVIEW); - glLoadMatrixf(save_model.m); - glh_set_current_modelview(save_model); - - - } - - gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); - - LLVertexBuffer::unbind(); - - gGL.setColorMask(true, true); -} - void LLPipeline::rebuildPools() { LLMemType mt(LLMemType::MTYPE_PIPELINE_REBUILD_POOLS); diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index fe0683d29f..75edb6b1ef 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -244,7 +244,6 @@ public: void renderHighlights(); void renderDebug(); - void renderForSelect(std::set& objects, BOOL render_transparent, const LLRect& screen_rect); void rebuildPools(); // Rebuild pools void findReferences(LLDrawable *drawablep); // Find the lists which have references to this object @@ -711,7 +710,6 @@ void render_bbox(const LLVector3 &min, const LLVector3 &max); void render_hud_elements(); extern LLPipeline gPipeline; -extern BOOL gRenderForSelect; extern BOOL gDebugPipeline; extern const LLMatrix4* gGLLastMatrix; -- cgit v1.2.3 From ffc07281ad0525b2f9f4ed2000c5b8dc5df11f79 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 4 Nov 2010 16:30:59 -0400 Subject: SH-358 FIXED LLPipeline::renderBloom crash on Windows --- indra/newview/llviewerdisplay.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 6640e32cd2..137704e960 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -218,6 +218,16 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLMemType mt_render(LLMemType::MTYPE_RENDER); LLFastTimer t(FTM_RENDER); + if (gResizeScreenTexture) + { //skip render on frames where screen texture is resizing + gGL.flush(); + glClear(GL_COLOR_BUFFER_BIT); + gViewerWindow->mWindow->swapBuffers(); + gResizeScreenTexture = FALSE; + gPipeline.resizeScreenTexture(); + return; + } + if (LLPipeline::sRenderFrameTest) { send_agent_pause(); @@ -531,6 +541,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gViewerWindow->setup3DViewport(); gPipeline.resetFrameStats(); // Reset per-frame statistics. + if (!gDisconnected) { LLMemType mt_du(LLMemType::MTYPE_DISPLAY_UPDATE); @@ -641,11 +652,11 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLVertexBuffer::clientCopy(0.016); } - if (gResizeScreenTexture) - { - gResizeScreenTexture = FALSE; - gPipeline.resizeScreenTexture(); - } + //if (gResizeScreenTexture) + //{ + // gResizeScreenTexture = FALSE; + // gPipeline.resizeScreenTexture(); + //} gGL.setColorMask(true, true); glClearColor(0,0,0,0); -- cgit v1.2.3 From c937eb1baed9df8eb99dd8a6bbe7d39075ec08d1 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 4 Nov 2010 16:34:02 -0400 Subject: VWR-21349 Don't enable FBO by default on mac or linux when using high/ultra graphics. Cap samples in LLMultiSampleBuffer to 4 samples to avoid using tons of memory when RenderUseFBO is set to TRUE and RenderFSAASamples is > 4. Don't allocate multisample buffers at all when RenderUseFBO is FALSE. --- indra/newview/featuretable_linux.txt | 4 ++-- indra/newview/featuretable_mac.txt | 4 ++-- indra/newview/pipeline.cpp | 7 +++---- 3 files changed, 7 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index 4a99280b06..efe29005f2 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -143,7 +143,7 @@ WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -RenderUseFBO 1 1 +RenderUseFBO 1 0 // // Ultra graphics (REALLY PURTY!) @@ -170,7 +170,7 @@ WLSkyDetail 1 128 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -RenderUseFBO 1 1 +RenderUseFBO 1 0 // // Class Unknown Hardware (unknown) diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 67cace7268..f030c9f8e5 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -140,7 +140,7 @@ RenderWaterReflections 1 0 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 WLSkyDetail 1 48 -RenderUseFBO 1 1 +RenderUseFBO 1 0 // // Ultra graphics (REALLY PURTY!) @@ -166,7 +166,7 @@ RenderWaterReflections 1 1 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 WLSkyDetail 1 128 -RenderUseFBO 1 1 +RenderUseFBO 1 0 // // Class Unknown Hardware (unknown) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 0c5735cdfc..dd69287dbb 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -533,7 +533,8 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) mScreenWidth = resX; mScreenHeight = resY; - U32 samples = gSavedSettings.getU32("RenderFSAASamples"); + //never use more than 4 samples for render targets + U32 samples = llmin(gSavedSettings.getU32("RenderFSAASamples"), (U32) 4); U32 res_mod = gSavedSettings.getU32("RenderResolutionDivisor"); if (res_mod > 1 && res_mod < resX && res_mod < resY) @@ -554,8 +555,6 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) 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 - 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); @@ -598,7 +597,7 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) } - if (gGLManager.mHasFramebufferMultisample && samples > 1) + if (LLRenderTarget::sUseFBO && gGLManager.mHasFramebufferMultisample && samples > 1) { mSampleBuffer.allocate(resX,resY,GL_RGBA,TRUE,TRUE,LLTexUnit::TT_RECT_TEXTURE,FALSE,samples); if (LLPipeline::sRenderDeferred) -- cgit v1.2.3 From aad22f9faf045f2412f7c32336cff3886464c157 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 4 Nov 2010 16:35:24 -0400 Subject: SH-281 Fix for snapshots showing interface all the time --- indra/newview/llviewerdisplay.cpp | 19 ++++++++++++++++--- indra/newview/llviewerwindow.cpp | 9 ++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 137704e960..40583f05bf 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -221,11 +221,24 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) if (gResizeScreenTexture) { //skip render on frames where screen texture is resizing gGL.flush(); - glClear(GL_COLOR_BUFFER_BIT); - gViewerWindow->mWindow->swapBuffers(); + if (!for_snapshot) + { + glClear(GL_COLOR_BUFFER_BIT); + gViewerWindow->mWindow->swapBuffers(); + } + gResizeScreenTexture = FALSE; gPipeline.resizeScreenTexture(); - return; + + if (!for_snapshot) + { + return; + } + } + + if (LLPipeline::sRenderDeferred) + { //hack to make sky show up in deferred snapshots + for_snapshot = FALSE; } if (LLPipeline::sRenderFrameTest) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index a0a3380441..15f82cf568 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3860,7 +3860,9 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei setCursor(UI_CURSOR_WAIT); // Hide all the UI widgets first and draw a frame - BOOL prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI); + BOOL prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? TRUE : FALSE; + + show_ui = show_ui ? TRUE : FALSE; if ( prev_draw_ui != show_ui) { @@ -3998,12 +4000,13 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei if (LLPipeline::sRenderDeferred) { - display(do_rebuild, scale_factor, subfield, FALSE); + display(do_rebuild, scale_factor, subfield, TRUE); } else { display(do_rebuild, scale_factor, subfield, TRUE); - // Required for showing the GUI in snapshots? See DEV-16350 for details. JC + // Required for showing the GUI in snapshots and performing bloom composite overlay + // Call even if show_ui is FALSE render_ui(scale_factor, subfield); } } -- cgit v1.2.3 From 7babf5b0da460e404e294a6f2d53a5c61e9c50e2 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 4 Nov 2010 16:35:46 -0400 Subject: SH-281 Make UI in snapshot off by default. --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 33f5482e50..791f2f760f 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8283,7 +8283,7 @@ Type Boolean Value - 1 + 0 RenderUIBuffer -- cgit v1.2.3 From b827f4d2aa036a2677af6f7f56b47b821c45e922 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 4 Nov 2010 16:36:37 -0400 Subject: SH-325 FIXED Add terminal / to SearchURL in viewer settings.xml Trivial fix to add "/" to the search string. --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 791f2f760f..cefcb3d9b1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3863,7 +3863,7 @@ Type String Value - http://search.secondlife.com/viewer/[CATEGORY]?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID]&channel=[CHANNEL]&version=[VERSION]&major=[VERSION_MAJOR]&minor=[VERSION_MINOR]&patch=[VERSION_PATCH]&build=[VERSION_BUILD] + http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID]&channel=[CHANNEL]&version=[VERSION]&major=[VERSION_MAJOR]&minor=[VERSION_MINOR]&patch=[VERSION_PATCH]&build=[VERSION_BUILD] HighResSnapshot -- cgit v1.2.3 From 0347844b340ed5b64ade2428fec85e5ecb2d478a Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 4 Nov 2010 16:53:14 -0400 Subject: SH-358 FIXED Non-FBO driven fix for anti-aliasing (make applying of FSAA require restart when FBO is disabled). --- indra/newview/llfloaterhardwaresettings.cpp | 7 +++++-- indra/newview/llviewerwindow.cpp | 2 +- indra/newview/pipeline.cpp | 2 +- .../skins/default/xui/en/floater_hardware_settings.xml | 14 +++++++++++++- 4 files changed, 20 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp index 3cd3c74ee4..e562b00a04 100644 --- a/indra/newview/llfloaterhardwaresettings.cpp +++ b/indra/newview/llfloaterhardwaresettings.cpp @@ -104,6 +104,8 @@ void LLFloaterHardwareSettings::refreshEnabledState() getChildView("(brightness, lower is brighter)")->setEnabled(!gPipeline.canUseWindLightShaders()); getChildView("fog")->setEnabled(!gPipeline.canUseWindLightShaders()); getChildView("fsaa")->setEnabled(gPipeline.canUseAntiAliasing()); + getChildView("antialiasing restart")->setVisible(!gSavedSettings.getBOOL("RenderUseFBO")); + /* Enable to reset fsaa value to disabled when feature is not available. if (!gPipeline.canUseAntiAliasing()) { @@ -130,7 +132,8 @@ BOOL LLFloaterHardwareSettings::postBuild() void LLFloaterHardwareSettings::apply() { // Anisotropic rendering - BOOL old_anisotropic = LLImageGL::sGlobalUseAnisotropic; + //Do nothing here -- this code is unreliable, and UI now tells users to restart for changes to take affect + /*BOOL old_anisotropic = LLImageGL::sGlobalUseAnisotropic; LLImageGL::sGlobalUseAnisotropic = getChild("ani")->getValue(); U32 fsaa = (U32) getChild("fsaa")->getValue().asInteger(); @@ -151,7 +154,7 @@ void LLFloaterHardwareSettings::apply() else if (old_anisotropic != LLImageGL::sGlobalUseAnisotropic) { gViewerWindow->restartDisplay(logged_in); - } + }*/ refresh(); } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 15f82cf568..ebcb6e3738 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1341,7 +1341,7 @@ LLViewerWindow::LLViewerWindow( gSavedSettings.getBOOL("DisableVerticalSync"), !gNoRender, ignore_pixel_depth, - 0); //gSavedSettings.getU32("RenderFSAASamples")); + gSavedSettings.getBOOL("RenderUseFBO") ? 0 : gSavedSettings.getU32("RenderFSAASamples")); //don't use window level anti-aliasing if FBOs are enabled if (!LLAppViewer::instance()->restoreErrorTrap()) { diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index dd69287dbb..03e6e65788 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -873,7 +873,7 @@ BOOL LLPipeline::canUseWindLightShadersOnObjects() const BOOL LLPipeline::canUseAntiAliasing() const { - return (gSavedSettings.getBOOL("RenderUseFBO")); + return TRUE; //(gSavedSettings.getBOOL("RenderUseFBO")); } void LLPipeline::unloadShaders() diff --git a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml index 27f8b4bb39..b2c620f435 100644 --- a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml @@ -22,7 +22,7 @@ + + (requires viewer restart) + Date: Thu, 4 Nov 2010 16:54:20 -0400 Subject: SH-353 FIXED Crash when toggling anisotropic filtering --- indra/newview/llfloaterhardwaresettings.cpp | 25 ------------------------- indra/newview/llviewercontrol.cpp | 8 ++++++++ 2 files changed, 8 insertions(+), 25 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp index e562b00a04..1e91710552 100644 --- a/indra/newview/llfloaterhardwaresettings.cpp +++ b/indra/newview/llfloaterhardwaresettings.cpp @@ -131,31 +131,6 @@ BOOL LLFloaterHardwareSettings::postBuild() void LLFloaterHardwareSettings::apply() { - // Anisotropic rendering - //Do nothing here -- this code is unreliable, and UI now tells users to restart for changes to take affect - /*BOOL old_anisotropic = LLImageGL::sGlobalUseAnisotropic; - LLImageGL::sGlobalUseAnisotropic = getChild("ani")->getValue(); - - U32 fsaa = (U32) getChild("fsaa")->getValue().asInteger(); - U32 old_fsaa = gSavedSettings.getU32("RenderFSAASamples"); - - BOOL logged_in = (LLStartUp::getStartupState() >= STATE_STARTED); - - if (old_fsaa != fsaa) - { - gSavedSettings.setU32("RenderFSAASamples", fsaa); - LLWindow* window = gViewerWindow->getWindow(); - LLCoordScreen size; - window->getSize(&size); - gViewerWindow->changeDisplaySettings(size, - gSavedSettings.getBOOL("DisableVerticalSync"), - logged_in); - } - else if (old_anisotropic != LLImageGL::sGlobalUseAnisotropic) - { - gViewerWindow->restartDisplay(logged_in); - }*/ - refresh(); } diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 522b5a7dfa..fbec2a7b9e 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -131,6 +131,13 @@ static bool handleReleaseGLBufferChanged(const LLSD& newvalue) return true; } +static bool handleAnisotropicChanged(const LLSD& newvalue) +{ + LLImageGL::sGlobalUseAnisotropic = newvalue.asBoolean(); + LLImageGL::dirtyTexOptions(); + return true; +} + static bool handleVolumeLODChanged(const LLSD& newvalue) { LLVOVolume::sLODFactor = (F32) newvalue.asReal(); @@ -498,6 +505,7 @@ void settings_setup_listeners() gSavedSettings.getControl("RenderSpecularResY")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2)); gSavedSettings.getControl("RenderSpecularExponent")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2)); gSavedSettings.getControl("RenderFSAASamples")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2)); + gSavedSettings.getControl("RenderAnisotropic")->getSignal()->connect(boost::bind(&handleAnisotropicChanged, _2)); gSavedSettings.getControl("RenderShadowResolutionScale")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2)); gSavedSettings.getControl("RenderGlow")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2)); gSavedSettings.getControl("RenderGlow")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); -- cgit v1.2.3 From 4a291538adf9f17b2125b3ec76e3b8033bf32bd3 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 4 Nov 2010 16:55:04 -0400 Subject: SH-353 FIXED Crash when toggling anisotropic filtering Anisotropic filtering does NOT require a viewer restart. --- indra/newview/skins/default/xui/en/floater_hardware_settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml index b2c620f435..0ea42f9757 100644 --- a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml @@ -22,7 +22,7 @@ Date: Tue, 2 Nov 2010 10:47:51 -0700 Subject: DN-141 llGetDisplayName (and other new LSL fucntions) doesn't register (highlight in red) as an internal function in the script editor --- indra/newview/skins/default/xui/en/strings.xml | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index bee0e4fde6..7f48d60ab2 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -1793,6 +1793,43 @@ Returns the media params for a particular face on an object, given the desired l llClearPrimMedia(integer face) Clears (deletes) the media and all params from the given face. + +llSetLinkPrimitiveParamsFast(integer linknumber,list rules) +Set primitive parameters for linknumber based on rules. + + +llGetLinkPrimitiveParams(integer linknumber,list rules) +Get primitive parameters for linknumber based on rules. + + +llLinkParticleSystem(integer linknumber,list rules) +Creates a particle system based on rules. Empty list removes particle system from object. +List format is [ rule1, data1, rule2, data2 . . . rulen, datan ]. + + +llSetLinkTextureAnim(integer link, integer mode, integer face, integer sizex, integer sizey, float start, float length, float rate) +Animate the texture on the specified prim's face/faces. + + +integer llGetLinkNumberOfSides(integer link) +Returns the number of sides of the specified linked prim. + + +string llGetUsername(key id) +Returns the single-word username of an avatar, iff the avatar is in the current region, otherwise the empty string. + + +key llRequestUsername(key id) +Requests single-word username of an avatar. When data is available the dataserver event will be raised. + + +string llGetDisplayName(key id) +Returns the name of an avatar, iff the avatar is in the current simulator, otherwise the empty string. + + +key llRequestDisplayName(key id) +Requests name of an avatar. When data is available the dataserver event will be raised. + Not Away -- cgit v1.2.3 From cb3b02acb15ab8868d89f2a6b5894f8324fd077c Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 4 Nov 2010 11:49:47 -0700 Subject: DN-132 Top scripts now show complete names --- indra/newview/llfloatertopobjects.cpp | 24 +++++++++++++++++++++++- indra/newview/llfloatertopobjects.h | 5 +++++ 2 files changed, 28 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp index 2aaf403d5f..e5c4547226 100644 --- a/indra/newview/llfloatertopobjects.cpp +++ b/indra/newview/llfloatertopobjects.cpp @@ -147,6 +147,17 @@ void LLFloaterTopObjects::handle_land_reply(LLMessageSystem* msg, void** data) } +void LLFloaterTopObjects::onAvatarNameCache(const LLUUID& agent_id, + const LLAvatarName& av_name, + LLSD element) +{ + LLScrollListCtrl *list = getChild("objects_list"); + + element["columns"][2]["value"] = av_name.getCompleteName(); + + list->addElement(element); +} + void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) { U32 request_flags; @@ -171,6 +182,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) F32 mono_score = 0.f; bool have_extended_data = false; S32 public_urls = 0; + LLUUID owner_id; msg->getU32Fast(_PREHASH_ReportData, _PREHASH_TaskLocalID, task_local_id, block); msg->getUUIDFast(_PREHASH_ReportData, _PREHASH_TaskID, task_id, block); @@ -186,8 +198,10 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) msg->getU32("DataExtended", "TimeStamp", time_stamp, block); msg->getF32("DataExtended", "MonoScore", mono_score, block); msg->getS32(_PREHASH_ReportData,"PublicURLs",public_urls,block); + msg->getUUID("DataExtended","OwnerID",owner_id,block); } + LLSD element; element["id"] = task_id; @@ -238,8 +252,16 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) columns[6]["font"] = "SANSSERIF"; } element["columns"] = columns; - list->addElement(element); + if (!owner_id.isNull()) + { + LLAvatarNameCache::get(owner_id, boost::bind(&LLFloaterTopObjects::onAvatarNameCache, this, _1, _2, element)); + } + else + { + list->addElement(element); + } + mObjectListData.append(element); mObjectListIDs.push_back(task_id); diff --git a/indra/newview/llfloatertopobjects.h b/indra/newview/llfloatertopobjects.h index a608ca20f1..edd91c491f 100644 --- a/indra/newview/llfloatertopobjects.h +++ b/indra/newview/llfloatertopobjects.h @@ -29,8 +29,11 @@ #include "llfloater.h" +class LLAvatarName; class LLUICtrl; +#include // boost::signals2::trackable + class LLFloaterTopObjects : public LLFloater { friend class LLFloaterReg; @@ -51,6 +54,8 @@ public: static void setMode(U32 mode); + void onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name, LLSD element); + private: LLFloaterTopObjects(const LLSD& key); ~LLFloaterTopObjects(); -- cgit v1.2.3 From 25c5f8aeb338803ce5a1386595877d15e6ce0aed Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 4 Nov 2010 11:51:02 -0700 Subject: DN-189 ??? Showing in tooltip over profile image in IM history --- indra/newview/llchathistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index cb5cf4a61d..9153f7325f 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -335,7 +335,7 @@ public: LLAvatarIconCtrl* icon = getChild("avatar_icon"); - if(mSourceType != CHAT_SOURCE_AGENT) + if(mSourceType != CHAT_SOURCE_AGENT || mAvatarID.isNull()) icon->setDrawTooltip(false); switch (mSourceType) -- cgit v1.2.3 From d5d389f062a042dfe65636f9ece6bc69bbd95065 Mon Sep 17 00:00:00 2001 From: Kyle Ambroff Date: Thu, 4 Nov 2010 12:37:02 -0700 Subject: ER-281: Object cache limit is too low in the viewer * Bump CacheNumberOfRegionsForObjects up to 20k in the default settings. * Make LLVOCache *actually* use this setting, with no upper bound. Reviewed with Kelly. --- indra/newview/app_settings/settings.xml | 4 ++-- indra/newview/llvocache.cpp | 13 ++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 33f5482e50..b46acfe83e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1150,13 +1150,13 @@ CacheNumberOfRegionsForObjects Comment - Controls number of regions to be cached for objects, ranges from 16 to 128. + Controls number of regions to be cached for objects. Persist 1 Type U32 Value - 128 + 20000 CacheSize diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index 8bdb8e069e..34e9babe2c 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -223,7 +223,6 @@ BOOL LLVOCacheEntry::writeToFile(LLAPRFile* apr_file) const // Format string used to construct filename for the object cache static const char OBJECT_CACHE_FILENAME[] = "objects_%d_%d.slc"; -const U32 MAX_NUM_OBJECT_ENTRIES = 128 ; const U32 NUM_ENTRIES_TO_PURGE = 16 ; const char* object_cache_dirname = "objectcache"; const char* header_filename = "object.cache"; @@ -291,9 +290,9 @@ void LLVOCache::initCache(ELLPath location, U32 size, U32 cache_version) if (!mReadOnly) { LLFile::mkdir(mObjectCacheDirName); - } - mCacheSize = llclamp(size, - MAX_NUM_OBJECT_ENTRIES, NUM_ENTRIES_TO_PURGE); + } + + mCacheSize = size; mMetaInfo.mVersion = cache_version; readCacheHeader(); @@ -424,7 +423,7 @@ void LLVOCache::readCacheHeader() HeaderEntryInfo* entry ; mNumEntries = 0 ; - while(mNumEntries < MAX_NUM_OBJECT_ENTRIES) + while(mNumEntries < mCacheSize) { entry = new HeaderEntryInfo() ; if(!checkRead(apr_file, entry, sizeof(HeaderEntryInfo))) @@ -477,10 +476,10 @@ void LLVOCache::writeCacheHeader() } mNumEntries = mHeaderEntryQueue.size() ; - if(mNumEntries < MAX_NUM_OBJECT_ENTRIES) + if(mNumEntries < mCacheSize) { HeaderEntryInfo* entry = new HeaderEntryInfo() ; - for(S32 i = mNumEntries ; i < MAX_NUM_OBJECT_ENTRIES ; i++) + for(S32 i = mNumEntries ; i < mCacheSize; i++) { //fill the cache with the default entry. if(!checkWrite(apr_file, entry, sizeof(HeaderEntryInfo))) -- cgit v1.2.3 From 301d3f86c0f35dfcac3d5de1348bb9196d28a08b Mon Sep 17 00:00:00 2001 From: Eli Linden Date: Thu, 4 Nov 2010 12:49:30 -0700 Subject: CT-633 WIP PL translation for Viewer 2.3, Set19, new file --- .../skins/default/xui/pl/floater_display_name.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 indra/newview/skins/default/xui/pl/floater_display_name.xml (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/pl/floater_display_name.xml b/indra/newview/skins/default/xui/pl/floater_display_name.xml new file mode 100644 index 0000000000..ea28e65728 --- /dev/null +++ b/indra/newview/skins/default/xui/pl/floater_display_name.xml @@ -0,0 +1,18 @@ + + + + Nazwa, którą nadałaś/nadałeś Twojemu awatarowi jest określana jako wyświetlana nazwa. Możesz ją zmieniać raz w tygodniu. + + + Nie możesz zmienić swojej wyświetlanej nazwy do: [TIME]. + + + Nowa wyświetlana nazwa: + + + Wpisz Twoją nową nazwę aby potwierdzić: + +