diff options
Diffstat (limited to 'indra/newview')
26 files changed, 340 insertions, 161 deletions
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 42cc526d6c..a6534bb333 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -6.2.4 +6.2.5 diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 84cd326f06..1874743644 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1243,7 +1243,7 @@ bool LLAppViewer::init() // Note: this is where gLocalSpeakerMgr and gActiveSpeakerMgr used to be instantiated. LLVoiceChannel::initClass(); - LLVoiceClient::getInstance()->init(gServicePump); + LLVoiceClient::initParamSingleton(gServicePump); LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLFloaterIMContainer::onCurrentChannelChanged, _1), true); joystick = LLViewerJoystick::getInstance(); @@ -4123,7 +4123,7 @@ bool LLAppViewer::initCache() mPurgeCache = false; BOOL read_only = mSecondInstance ? TRUE : FALSE; LLAppViewer::getTextureCache()->setReadOnly(read_only) ; - LLVOCache::getInstance()->setReadOnly(read_only); + LLVOCache::initParamSingleton(LL_PATH_CACHE, gSavedSettings.getU32("CacheNumberOfRegionsForObjects"), getObjectCacheVersion(), read_only); bool texture_cache_mismatch = false; if (gSavedSettings.getS32("LocalCacheVersion") != LLAppViewer::getTextureCacheVersion()) @@ -4195,8 +4195,6 @@ bool LLAppViewer::initCache() S64 extra = LLAppViewer::getTextureCache()->initCache(LL_PATH_CACHE, texture_cache_size, texture_cache_mismatch); texture_cache_size -= extra; - LLVOCache::getInstance()->initCache(LL_PATH_CACHE, gSavedSettings.getU32("CacheNumberOfRegionsForObjects"), getObjectCacheVersion()) ; - LLSplashScreen::update(LLTrans::getString("StartupInitializingVFS")); // Init the VFS diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp index 7d2712eec7..cb5f9c8a2c 100644 --- a/indra/newview/lldonotdisturbnotificationstorage.cpp +++ b/indra/newview/lldonotdisturbnotificationstorage.cpp @@ -48,7 +48,6 @@ const char * LLDoNotDisturbNotificationStorage::offerName = "UserGiveItem"; LLDoNotDisturbNotificationStorageTimer::LLDoNotDisturbNotificationStorageTimer() : LLEventTimer(DND_TIMER) { - } LLDoNotDisturbNotificationStorageTimer::~LLDoNotDisturbNotificationStorageTimer() @@ -74,6 +73,7 @@ LLDoNotDisturbNotificationStorage::LLDoNotDisturbNotificationStorage() { nameToPayloadParameterMap[toastName] = "SESSION_ID"; nameToPayloadParameterMap[offerName] = "object_id"; + initialize(); } LLDoNotDisturbNotificationStorage::~LLDoNotDisturbNotificationStorage() diff --git a/indra/newview/lldonotdisturbnotificationstorage.h b/indra/newview/lldonotdisturbnotificationstorage.h index e6cb7835e3..c6f0bf1ab5 100644 --- a/indra/newview/lldonotdisturbnotificationstorage.h +++ b/indra/newview/lldonotdisturbnotificationstorage.h @@ -45,7 +45,7 @@ public: BOOL tick(); }; -class LLDoNotDisturbNotificationStorage : public LLSingleton<LLDoNotDisturbNotificationStorage>, public LLNotificationStorage +class LLDoNotDisturbNotificationStorage : public LLParamSingleton<LLDoNotDisturbNotificationStorage>, public LLNotificationStorage { LLSINGLETON(LLDoNotDisturbNotificationStorage); ~LLDoNotDisturbNotificationStorage(); @@ -55,7 +55,6 @@ public: static const char * toastName; static const char * offerName; - void initialize(); bool getDirty(); void resetDirty(); void saveNotifications(); @@ -66,6 +65,8 @@ public: protected: private: + void initialize(); + bool mDirty; LLDoNotDisturbNotificationStorageTimer mTimer; diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 004e4a6262..1587903a15 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -602,15 +602,10 @@ void renderFace(LLDrawable* drawable, LLFace *face) LLVOVolume* vobj = drawable->getVOVolume(); if (vobj) { - LLVertexBuffer::unbind(); - gGL.pushMatrix(); - gGL.multMatrix((F32*)vobj->getRelativeXform().mMatrix); - LLVolume* volume = NULL; if (drawable->isState(LLDrawable::RIGGED)) { - vobj->updateRiggedVolume(); volume = vobj->getRiggedVolume(); } else @@ -623,44 +618,11 @@ void renderFace(LLDrawable* drawable, LLFace *face) const LLVolumeFace& vol_face = volume->getVolumeFace(face->getTEOffset()); LLVertexBuffer::drawElements(LLRender::TRIANGLES, vol_face.mPositions, NULL, vol_face.mNumIndices, vol_face.mIndices); } - - gGL.popMatrix(); } } -void LLFace::renderOneWireframe(const LLColor4 &color, F32 fogCfx, bool wireframe_selection, bool bRenderHiddenSelections) +void LLFace::renderOneWireframe(const LLColor4 &color, F32 fogCfx, bool wireframe_selection, bool bRenderHiddenSelections, bool shader) { - //Need to because crash on ATI 3800 (and similar cards) MAINT-5018 - LLGLDisable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0); - - LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr; - - if (shader) - { - gDebugProgram.bind(); - } - - gGL.matrixMode(LLRender::MM_MODELVIEW); - gGL.pushMatrix(); - - BOOL is_hud_object = mVObjp->isHUDAttachment(); - - if (mDrawablep->isActive()) - { - gGL.loadMatrix(gGLModelView); - gGL.multMatrix((F32*)mVObjp->getRenderMatrix().mMatrix); - } - else if (!is_hud_object) - { - gGL.loadIdentity(); - gGL.multMatrix(gGLModelView); - LLVector3 trans = mVObjp->getRegion()->getOriginAgent(); - gGL.translatef(trans.mV[0], trans.mV[1], trans.mV[2]); - } - - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - - if (bRenderHiddenSelections) { gGL.blendFunc(LLRender::BF_SOURCE_COLOR, LLRender::BF_ONE); @@ -709,15 +671,6 @@ void LLFace::renderOneWireframe(const LLColor4 &color, F32 fogCfx, bool wirefram glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); renderFace(mDrawablep, this); } - - glLineWidth(1.f); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - gGL.popMatrix(); - - if (shader) - { - shader->bind(); - } } /* removed in lieu of raycast uv detection @@ -1100,7 +1053,7 @@ void LLFace::getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_po // Returns the necessary texture transform to align this face's TE to align_to's TE bool LLFace::calcAlignedPlanarTE(const LLFace* align_to, LLVector2* res_st_offset, - LLVector2* res_st_scale, F32* res_st_rot) const + LLVector2* res_st_scale, F32* res_st_rot, LLRender::eTexIndex map) const { if (!align_to) { @@ -1113,6 +1066,43 @@ bool LLFace::calcAlignedPlanarTE(const LLFace* align_to, LLVector2* res_st_offs return false; } + F32 map_rot = 0.f, map_scaleS = 0.f, map_scaleT = 0.f, map_offsS = 0.f, map_offsT = 0.f; + + switch (map) + { + case LLRender::DIFFUSE_MAP: + map_rot = orig_tep->getRotation(); + map_scaleS = orig_tep->mScaleS; + map_scaleT = orig_tep->mScaleT; + map_offsS = orig_tep->mOffsetS; + map_offsT = orig_tep->mOffsetT; + break; + case LLRender::NORMAL_MAP: + if (orig_tep->getMaterialParams()->getNormalID().isNull()) + { + return false; + } + map_rot = orig_tep->getMaterialParams()->getNormalRotation(); + map_scaleS = orig_tep->getMaterialParams()->getNormalRepeatX(); + map_scaleT = orig_tep->getMaterialParams()->getNormalRepeatY(); + map_offsS = orig_tep->getMaterialParams()->getNormalOffsetX(); + map_offsT = orig_tep->getMaterialParams()->getNormalOffsetY(); + break; + case LLRender::SPECULAR_MAP: + if (orig_tep->getMaterialParams()->getSpecularID().isNull()) + { + return false; + } + map_rot = orig_tep->getMaterialParams()->getSpecularRotation(); + map_scaleS = orig_tep->getMaterialParams()->getSpecularRepeatX(); + map_scaleT = orig_tep->getMaterialParams()->getSpecularRepeatY(); + map_offsS = orig_tep->getMaterialParams()->getSpecularOffsetX(); + map_offsT = orig_tep->getMaterialParams()->getSpecularOffsetY(); + break; + default: /*make compiler happy*/ + break; + } + LLVector3 orig_pos, this_pos; LLQuaternion orig_face_rot, this_face_rot; F32 orig_proj_scale, this_proj_scale; @@ -1120,7 +1110,7 @@ bool LLFace::calcAlignedPlanarTE(const LLFace* align_to, LLVector2* res_st_offs getPlanarProjectedParams(&this_face_rot, &this_pos, &this_proj_scale); // The rotation of "this face's" texture: - LLQuaternion orig_st_rot = LLQuaternion(orig_tep->getRotation(), LLVector3::z_axis) * orig_face_rot; + LLQuaternion orig_st_rot = LLQuaternion(map_rot, LLVector3::z_axis) * orig_face_rot; LLQuaternion this_st_rot = orig_st_rot * ~this_face_rot; F32 x_ang, y_ang, z_ang; this_st_rot.getEulerAngles(&x_ang, &y_ang, &z_ang); @@ -1128,10 +1118,10 @@ bool LLFace::calcAlignedPlanarTE(const LLFace* align_to, LLVector2* res_st_offs // Offset and scale of "this face's" texture: LLVector3 centers_dist = (this_pos - orig_pos) * ~orig_st_rot; - LLVector3 st_scale(orig_tep->mScaleS, orig_tep->mScaleT, 1.f); + LLVector3 st_scale(map_scaleS, map_scaleT, 1.f); st_scale *= orig_proj_scale; centers_dist.scaleVec(st_scale); - LLVector2 orig_st_offset(orig_tep->mOffsetS, orig_tep->mOffsetT); + LLVector2 orig_st_offset(map_offsS, map_offsT); *res_st_offset = orig_st_offset + (LLVector2)centers_dist; res_st_offset->mV[VX] -= (S32)res_st_offset->mV[VX]; diff --git a/indra/newview/llface.h b/indra/newview/llface.h index 83547c75e8..77861f7d2f 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -112,7 +112,7 @@ public: LLVector2 surfaceToTexture(LLVector2 surface_coord, const LLVector4a& position, const LLVector4a& normal); void getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_pos, F32* scale) const; bool calcAlignedPlanarTE(const LLFace* align_to, LLVector2* st_offset, - LLVector2* st_scale, F32* st_rot) const; + LLVector2* st_scale, F32* st_rot, LLRender::eTexIndex map = LLRender::DIFFUSE_MAP) const; U32 getState() const { return mState; } void setState(U32 state) { mState |= state; } @@ -196,7 +196,7 @@ public: void renderSelectedUV(); void renderSelected(LLViewerTexture *image, const LLColor4 &color); - void renderOneWireframe(const LLColor4 &color, F32 fogCfx, bool wireframe_selection, bool bRenderHiddenSelections); + void renderOneWireframe(const LLColor4 &color, F32 fogCfx, bool wireframe_selection, bool bRenderHiddenSelections, bool shader); F32 getKey() const { return mDistance; } diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 8d07035b97..aa9cba0c18 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -522,7 +522,7 @@ void LLFeatureManager::cleanupFeatureTables() mMaskList.clear(); } -void LLFeatureManager::init() +void LLFeatureManager::initSingleton() { // load the tables loadFeatureTables(); diff --git a/indra/newview/llfeaturemanager.h b/indra/newview/llfeaturemanager.h index f77861a1a7..42a226cd18 100644 --- a/indra/newview/llfeaturemanager.h +++ b/indra/newview/llfeaturemanager.h @@ -100,9 +100,10 @@ class LLFeatureManager : public LLFeatureList, public LLSingleton<LLFeatureManag LLSINGLETON(LLFeatureManager); ~LLFeatureManager() {cleanupFeatureTables();} -public: // initialize this by loading feature table and gpu table - void init(); + void initSingleton(); + +public: void maskCurrentList(const std::string& name); // Mask the current feature list with the named list diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index c08aaf3f50..a7931137b0 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -784,6 +784,7 @@ void LLFloaterSnapshot::Impl::onCommitLayerTypes(LLUICtrl* ctrl, void*data) previewp->setSnapshotBufferType((LLSnapshotModel::ESnapshotLayerType)combobox->getCurrentIndex()); } view->impl->checkAutoSnapshot(previewp, TRUE); + previewp->updateSnapshot(TRUE, TRUE); } } diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 67bac9a597..93c81889de 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -82,6 +82,8 @@ const S32 ALPHAMODE_MASK = 2; // Alpha masking mode const S32 BUMPY_TEXTURE = 18; // use supplied normal map const S32 SHINY_TEXTURE = 4; // use supplied specular map +BOOST_STATIC_ASSERT(MATTYPE_DIFFUSE == LLRender::DIFFUSE_MAP && MATTYPE_NORMAL == LLRender::NORMAL_MAP && MATTYPE_SPECULAR == LLRender::SPECULAR_MAP); + // // "Use texture" label for normal/specular type comboboxes // Filled in at initialization from translated strings @@ -154,6 +156,7 @@ BOOL LLPanelFace::postBuild() childSetCommitCallback("maskcutoff",&LLPanelFace::onCommitMaterialMaskCutoff, this); childSetAction("button align",&LLPanelFace::onClickAutoFix,this); + childSetAction("button align textures", &LLPanelFace::onAlignTexture, this); LLTextureCtrl* mTextureCtrl; LLTextureCtrl* mShinyTextureCtrl; @@ -439,11 +442,28 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor { BOOL valid; F32 value; - LLSpinCtrl* ctrlTexScaleS = mPanel->getChild<LLSpinCtrl>("TexScaleU"); - LLSpinCtrl* ctrlTexScaleT = mPanel->getChild<LLSpinCtrl>("TexScaleV"); - LLSpinCtrl* ctrlTexOffsetS = mPanel->getChild<LLSpinCtrl>("TexOffsetU"); - LLSpinCtrl* ctrlTexOffsetT = mPanel->getChild<LLSpinCtrl>("TexOffsetV"); - LLSpinCtrl* ctrlTexRotation = mPanel->getChild<LLSpinCtrl>("TexRot"); + + LLRadioGroup * radio_mat_type = mPanel->getChild<LLRadioGroup>("radio_material_type"); + std::string prefix; + switch (radio_mat_type->getSelectedIndex()) + { + case MATTYPE_DIFFUSE: + prefix = "Tex"; + break; + case MATTYPE_NORMAL: + prefix = "bumpy"; + break; + case MATTYPE_SPECULAR: + prefix = "shiny"; + break; + } + + LLSpinCtrl * ctrlTexScaleS = mPanel->getChild<LLSpinCtrl>(prefix + "ScaleU"); + LLSpinCtrl * ctrlTexScaleT = mPanel->getChild<LLSpinCtrl>(prefix + "ScaleV"); + LLSpinCtrl * ctrlTexOffsetS = mPanel->getChild<LLSpinCtrl>(prefix + "OffsetU"); + LLSpinCtrl * ctrlTexOffsetT = mPanel->getChild<LLSpinCtrl>(prefix + "OffsetV"); + LLSpinCtrl * ctrlTexRotation = mPanel->getChild<LLSpinCtrl>(prefix + "Rot"); + LLComboBox* comboTexGen = mPanel->getChild<LLComboBox>("combobox texgen"); LLCheckBoxCtrl* cb_planar_align = mPanel->getChild<LLCheckBoxCtrl>("checkbox planar align"); bool align_planar = (cb_planar_align && cb_planar_align->get()); @@ -466,8 +486,8 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor if (align_planar) { - LLPanelFace::LLSelectedTEMaterial::setNormalRepeatX(mPanel, value, te); - LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatX(mPanel, value, te); + LLPanelFace::LLSelectedTEMaterial::setNormalRepeatX(mPanel, value, te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatX(mPanel, value, te, object->getID()); } } } @@ -491,8 +511,8 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor if (align_planar) { - LLPanelFace::LLSelectedTEMaterial::setNormalRepeatY(mPanel, value, te); - LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatY(mPanel, value, te); + LLPanelFace::LLSelectedTEMaterial::setNormalRepeatY(mPanel, value, te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatY(mPanel, value, te, object->getID()); } } } @@ -507,8 +527,8 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor if (align_planar) { - LLPanelFace::LLSelectedTEMaterial::setNormalOffsetX(mPanel, value, te); - LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetX(mPanel, value, te); + LLPanelFace::LLSelectedTEMaterial::setNormalOffsetX(mPanel, value, te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetX(mPanel, value, te, object->getID()); } } } @@ -523,8 +543,8 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor if (align_planar) { - LLPanelFace::LLSelectedTEMaterial::setNormalOffsetY(mPanel, value, te); - LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetY(mPanel, value, te); + LLPanelFace::LLSelectedTEMaterial::setNormalOffsetY(mPanel, value, te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetY(mPanel, value, te, object->getID()); } } } @@ -539,8 +559,8 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor if (align_planar) { - LLPanelFace::LLSelectedTEMaterial::setNormalRotation(mPanel, value, te); - LLPanelFace::LLSelectedTEMaterial::setSpecularRotation(mPanel, value, te); + LLPanelFace::LLSelectedTEMaterial::setNormalRotation(mPanel, value, te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularRotation(mPanel, value, te, object->getID()); } } } @@ -612,6 +632,68 @@ private: LLFace* mCenterFace; }; +struct LLPanelFaceSetAlignedConcreteTEFunctor : public LLSelectedTEFunctor +{ + LLPanelFaceSetAlignedConcreteTEFunctor(LLPanelFace* panel, LLFace* center_face, LLRender::eTexIndex map) : + mPanel(panel), + mChefFace(center_face), + mMap(map) + {} + + virtual bool apply(LLViewerObject* object, S32 te) + { + LLFace* facep = object->mDrawable->getFace(te); + if (!facep) + { + return true; + } + + if (facep->getViewerObject()->getVolume()->getNumVolumeFaces() <= te) + { + return true; + } + + if (mChefFace != facep) + { + LLVector2 uv_offset, uv_scale; + F32 uv_rot; + if (facep->calcAlignedPlanarTE(mChefFace, &uv_offset, &uv_scale, &uv_rot, mMap)) + { + switch (mMap) + { + case LLRender::DIFFUSE_MAP: + object->setTEOffset(te, uv_offset.mV[VX], uv_offset.mV[VY]); + object->setTEScale(te, uv_scale.mV[VX], uv_scale.mV[VY]); + object->setTERotation(te, uv_rot); + break; + case LLRender::NORMAL_MAP: + LLPanelFace::LLSelectedTEMaterial::setNormalRotation(mPanel, uv_rot, te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setNormalOffsetX(mPanel, uv_offset.mV[VX], te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setNormalOffsetY(mPanel, uv_offset.mV[VY], te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setNormalRepeatX(mPanel, uv_scale.mV[VX], te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setNormalRepeatY(mPanel, uv_scale.mV[VY], te, object->getID()); + break; + case LLRender::SPECULAR_MAP: + LLPanelFace::LLSelectedTEMaterial::setSpecularRotation(mPanel, uv_rot, te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetX(mPanel, uv_offset.mV[VX], te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetY(mPanel, uv_offset.mV[VY], te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatX(mPanel, uv_scale.mV[VX], te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatY(mPanel, uv_scale.mV[VY], te, object->getID()); + break; + default: /*make compiler happy*/ + break; + } + } + } + + return true; + } +private: + LLPanelFace* mPanel; + LLFace* mChefFace; + LLRender::eTexIndex mMap; +}; + // Functor that tests if a face is aligned to mCenterFace struct LLPanelFaceGetIsAlignedTEFunctor : public LLSelectedTEFunctor { @@ -697,6 +779,17 @@ void LLPanelFace::sendTextureInfo() LLSelectMgr::getInstance()->getSelection()->applyToObjects(&sendfunc); } +void LLPanelFace::alignTestureLayer() +{ + LLFace* last_face = NULL; + bool identical_face = false; + LLSelectedTE::getFace(last_face, identical_face); + + LLRadioGroup * radio_mat_type = getChild<LLRadioGroup>("radio_material_type"); + LLPanelFaceSetAlignedConcreteTEFunctor setfunc(this, last_face, static_cast<LLRender::eTexIndex>(radio_mat_type->getSelectedIndex())); + LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc); +} + void LLPanelFace::getState() { updateUI(); @@ -983,6 +1076,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) bool enabled = (editable && isIdenticalPlanarTexgen()); childSetValue("checkbox planar align", align_planar && enabled); childSetEnabled("checkbox planar align", enabled); + childSetEnabled("button align textures", enabled && LLSelectMgr::getInstance()->getSelection()->getObjectCount() > 1); if (align_planar && enabled) { @@ -2134,7 +2228,18 @@ void LLPanelFace::onCommitMaterialBumpyRot(LLUICtrl* ctrl, void* userdata) } else { - LLSelectedTEMaterial::setNormalRotation(self,self->getCurrentBumpyRot() * DEG_TO_RAD); + if ((bool)self->childGetValue("checkbox planar align").asBoolean()) + { + LLFace* last_face = NULL; + bool identical_face = false; + LLSelectedTE::getFace(last_face, identical_face); + LLPanelFaceSetAlignedTEFunctor setfunc(self, last_face); + LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc); + } + else + { + LLSelectedTEMaterial::setNormalRotation(self, self->getCurrentBumpyRot() * DEG_TO_RAD); + } } } @@ -2151,7 +2256,18 @@ void LLPanelFace::onCommitMaterialShinyRot(LLUICtrl* ctrl, void* userdata) } else { - LLSelectedTEMaterial::setSpecularRotation(self,self->getCurrentShinyRot() * DEG_TO_RAD); + if ((bool)self->childGetValue("checkbox planar align").asBoolean()) + { + LLFace* last_face = NULL; + bool identical_face = false; + LLSelectedTE::getFace(last_face, identical_face); + LLPanelFaceSetAlignedTEFunctor setfunc(self, last_face); + LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc); + } + else + { + LLSelectedTEMaterial::setSpecularRotation(self, self->getCurrentShinyRot() * DEG_TO_RAD); + } } } @@ -2408,6 +2524,11 @@ void LLPanelFace::onClickAutoFix(void* userdata) LLSelectMgr::getInstance()->getSelection()->applyToObjects(&sendfunc); } +void LLPanelFace::onAlignTexture(void* userdata) +{ + LLPanelFace* self = (LLPanelFace*)userdata; + self->alignTestureLayer(); +} // TODO: I don't know who put these in or what these are for??? diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 0b40d7d41a..2d57d89a44 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -126,6 +126,7 @@ protected: void sendFullbright(); // applies and sends full bright void sendGlow(); void sendMedia(); + void alignTestureLayer(); // this function is to return TRUE if the drag should succeed. static BOOL onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item); @@ -202,6 +203,7 @@ protected: static void onCommitPlanarAlign( LLUICtrl* ctrl, void* userdata); static void onCommitRepeatsPerMeter( LLUICtrl* ctrl, void* userinfo); static void onClickAutoFix(void*); + static void onAlignTexture(void*); static F32 valueGlow(LLViewerObject* object, S32 face); diff --git a/indra/newview/llpersistentnotificationstorage.cpp b/indra/newview/llpersistentnotificationstorage.cpp index 264382ae82..f95ab9928d 100644 --- a/indra/newview/llpersistentnotificationstorage.cpp +++ b/indra/newview/llpersistentnotificationstorage.cpp @@ -40,6 +40,7 @@ LLPersistentNotificationStorage::LLPersistentNotificationStorage(): LLNotificationStorage("") , mLoaded(false) { + initialize(); } LLPersistentNotificationStorage::~LLPersistentNotificationStorage() diff --git a/indra/newview/llpersistentnotificationstorage.h b/indra/newview/llpersistentnotificationstorage.h index 40c9923c74..1fb4487286 100644 --- a/indra/newview/llpersistentnotificationstorage.h +++ b/indra/newview/llpersistentnotificationstorage.h @@ -43,7 +43,7 @@ class LLSD; // be a) serializable(implement LLNotificationResponderInterface), // b) registered with LLResponderRegistry (found in llpersistentnotificationstorage.cpp). -class LLPersistentNotificationStorage : public LLSingleton<LLPersistentNotificationStorage>, public LLNotificationStorage +class LLPersistentNotificationStorage : public LLParamSingleton<LLPersistentNotificationStorage>, public LLNotificationStorage { LLSINGLETON(LLPersistentNotificationStorage); ~LLPersistentNotificationStorage(); @@ -53,11 +53,11 @@ public: void saveNotifications(); void loadNotifications(); - void initialize(); - protected: private: + void initialize(); + bool onPersistentChannelChanged(const LLSD& payload); bool mLoaded; }; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index b36df244f8..74022cee01 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -180,7 +180,7 @@ LLSelectMgr::LLSelectMgr() sHighlightThickness = gSavedSettings.getF32("SelectionHighlightThickness"); sHighlightUScale = gSavedSettings.getF32("SelectionHighlightUScale"); sHighlightVScale = gSavedSettings.getF32("SelectionHighlightVScale"); - sHighlightAlpha = gSavedSettings.getF32("SelectionHighlightAlpha"); + sHighlightAlpha = gSavedSettings.getF32("SelectionHighlightAlpha") * 2; sHighlightAlphaTest = gSavedSettings.getF32("SelectionHighlightAlphaTest"); sHighlightUAnim = gSavedSettings.getF32("SelectionHighlightUAnim"); sHighlightVAnim = gSavedSettings.getF32("SelectionHighlightVAnim"); @@ -5838,6 +5838,84 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) gGL.scalef(cur_zoom, cur_zoom, cur_zoom); } + bool wireframe_selection = (gFloaterTools && gFloaterTools->getVisible()) || LLSelectMgr::sRenderHiddenSelections; + F32 fogCfx = (F32)llclamp((LLSelectMgr::getInstance()->getSelectionCenterGlobal() - gAgentCamera.getCameraPositionGlobal()).magVec() / (LLSelectMgr::getInstance()->getBBoxOfSelection().getExtentLocal().magVec() * 4), 0.0, 1.0); + + static LLColor4 sParentColor = LLColor4(sSilhouetteParentColor[VRED], sSilhouetteParentColor[VGREEN], sSilhouetteParentColor[VBLUE], LLSelectMgr::sHighlightAlpha); + static LLColor4 sChildColor = LLColor4(sSilhouetteChildColor[VRED], sSilhouetteChildColor[VGREEN], sSilhouetteChildColor[VBLUE], LLSelectMgr::sHighlightAlpha); + + auto renderMeshSelection_f = [fogCfx, wireframe_selection](LLSelectNode* node, LLViewerObject* objectp, LLColor4 hlColor) + { + //Need to because crash on ATI 3800 (and similar cards) MAINT-5018 + LLGLDisable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0); + + LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr; + + if (shader) + { + gDebugProgram.bind(); + } + + gGL.matrixMode(LLRender::MM_MODELVIEW); + gGL.pushMatrix(); + + BOOL is_hud_object = objectp->isHUDAttachment(); + + if (!is_hud_object) + { + gGL.loadIdentity(); + gGL.multMatrix(gGLModelView); + } + + if (objectp->mDrawable->isActive()) + { + gGL.multMatrix((F32*)objectp->getRenderMatrix().mMatrix); + } + else if (!is_hud_object) + { + LLVector3 trans = objectp->getRegion()->getOriginAgent(); + gGL.translatef(trans.mV[0], trans.mV[1], trans.mV[2]); + } + + bool bRenderHidenSelection = node->isTransient() ? false : LLSelectMgr::sRenderHiddenSelections; + + + LLVOVolume* vobj = objectp->mDrawable->getVOVolume(); + if (vobj) + { + LLVertexBuffer::unbind(); + gGL.pushMatrix(); + gGL.multMatrix((F32*)vobj->getRelativeXform().mMatrix); + + if (objectp->mDrawable->isState(LLDrawable::RIGGED)) + { + vobj->updateRiggedVolume(true); + } + } + + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + + S32 num_tes = llmin((S32)objectp->getNumTEs(), (S32)objectp->getNumFaces()); // avatars have TEs but no faces + for (S32 te = 0; te < num_tes; ++te) + { + if (node->isTESelected(te)) + { + objectp->mDrawable->getFace(te)->renderOneWireframe(hlColor, fogCfx, wireframe_selection, bRenderHidenSelection, nullptr != shader); + } + } + + gGL.popMatrix(); + gGL.popMatrix(); + + glLineWidth(1.f); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + + if (shader) + { + shader->bind(); + } + }; + if (mSelectedObjects->getNumNodes()) { LLUUID inspect_item_id= LLUUID::null; @@ -5855,9 +5933,6 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) } } - bool wireframe_selection = (gFloaterTools && gFloaterTools->getVisible()) || LLSelectMgr::sRenderHiddenSelections; - F32 fogCfx = (F32)llclamp((LLSelectMgr::getInstance()->getSelectionCenterGlobal() - gAgentCamera.getCameraPositionGlobal()).magVec() / (LLSelectMgr::getInstance()->getBBoxOfSelection().getExtentLocal().magVec() * 4), 0.0, 1.0); - LLUUID focus_item_id = LLViewerMediaFocus::getInstance()->getFocusedObjectID(); for (S32 pass = 0; pass < 2; pass++) { @@ -5865,33 +5940,28 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) iter != mSelectedObjects->end(); iter++) { LLSelectNode* node = *iter; + + if (getTEMode() && !node->hasSelectedTE()) + continue; + LLViewerObject* objectp = node->getObject(); if (!objectp) continue; - if(getTEMode() && !node->hasSelectedTE()) - continue; - if (objectp->mDrawable && objectp->mDrawable->getVOVolume() && objectp->mDrawable->getVOVolume()->isMesh()) { - S32 num_tes = llmin((S32)objectp->getNumTEs(), (S32)objectp->getNumFaces()); // avatars have TEs but no faces - for (S32 te = 0; te < num_tes; ++te) + LLColor4 hlColor = objectp->isRootEdit() ? sParentColor : sChildColor; + if (objectp->getID() == inspect_item_id) { - if (!getTEMode()) - { - objectp->mDrawable->getFace(te)->renderOneWireframe( - LLColor4(sSilhouetteParentColor[VRED], sSilhouetteParentColor[VGREEN], sSilhouetteParentColor[VBLUE], LLSelectMgr::sHighlightAlpha * 2) - , fogCfx, wireframe_selection, node->isTransient() ? FALSE : LLSelectMgr::sRenderHiddenSelections); - } - else if(node->isTESelected(te)) - { - objectp->mDrawable->getFace(te)->renderOneWireframe( - LLColor4(sSilhouetteParentColor[VRED], sSilhouetteParentColor[VGREEN], sSilhouetteParentColor[VBLUE], LLSelectMgr::sHighlightAlpha * 2) - , fogCfx, wireframe_selection, node->isTransient() ? FALSE : LLSelectMgr::sRenderHiddenSelections); - } + hlColor = sHighlightInspectColor; } + else if (node->isTransient()) + { + hlColor = sContextSilhouetteColor; + } + renderMeshSelection_f(node, objectp, hlColor); } else { @@ -5944,14 +6014,20 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) { continue; } - - if (subtracting_from_selection) + + LLColor4 highlight_color = objectp->isRoot() ? sHighlightParentColor : sHighlightChildColor; + if (objectp->mDrawable + && objectp->mDrawable->getVOVolume() + && objectp->mDrawable->getVOVolume()->isMesh()) + { + renderMeshSelection_f(node, objectp, subtracting_from_selection ? LLColor4::red : highlight_color); + } + else if (subtracting_from_selection) { node->renderOneSilhouette(LLColor4::red); } else if (!objectp->isSelected()) { - LLColor4 highlight_color = objectp->isRoot() ? sHighlightParentColor : sHighlightChildColor; node->renderOneSilhouette(highlight_color); } } @@ -6450,7 +6526,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) gGL.texCoord2fv(tc[0].mV); gGL.vertex3fv( v[0].mV ); - gGL.color4f(color.mV[VRED]*2, color.mV[VGREEN]*2, color.mV[VBLUE]*2, LLSelectMgr::sHighlightAlpha*2); + gGL.color4f(color.mV[VRED]*2, color.mV[VGREEN]*2, color.mV[VBLUE]*2, LLSelectMgr::sHighlightAlpha); gGL.texCoord2fv( tc[1].mV ); gGL.vertex3fv( v[1].mV ); @@ -6460,7 +6536,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) gGL.vertex3fv( v[2].mV ); - gGL.color4f(color.mV[VRED]*2, color.mV[VGREEN]*2, color.mV[VBLUE]*2, LLSelectMgr::sHighlightAlpha*2); + gGL.color4f(color.mV[VRED]*2, color.mV[VGREEN]*2, color.mV[VBLUE]*2, LLSelectMgr::sHighlightAlpha); gGL.texCoord2fv( tc[1].mV ); gGL.vertex3fv( v[1].mV ); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index e4cabbaddd..d7b8080efd 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -895,8 +895,8 @@ bool idle_startup() LLFile::mkdir(gDirUtilp->getLindenUserDir()); // As soon as directories are ready initialize notification storages - LLPersistentNotificationStorage::getInstance()->initialize(); - LLDoNotDisturbNotificationStorage::getInstance()->initialize(); + LLPersistentNotificationStorage::initParamSingleton(); + LLDoNotDisturbNotificationStorage::initParamSingleton(); // Set PerAccountSettingsFile to the default value. gSavedSettings.setString("PerAccountSettingsFile", diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 30291d1a93..b1b5275f82 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -52,7 +52,6 @@ mMediaParcelLocalID(0) LLMessageSystem* msg = gMessageSystem; msg->setHandlerFunc("ParcelMediaCommandMessage", parcelMediaCommandMessageHandler ); msg->setHandlerFunc("ParcelMediaUpdate", parcelMediaUpdateHandler ); - LLViewerParcelMediaAutoPlay::initClass(); } LLViewerParcelMedia::~LLViewerParcelMedia() diff --git a/indra/newview/llviewerparcelmediaautoplay.cpp b/indra/newview/llviewerparcelmediaautoplay.cpp index d38a434d6c..b5a76ccba2 100644 --- a/indra/newview/llviewerparcelmediaautoplay.cpp +++ b/indra/newview/llviewerparcelmediaautoplay.cpp @@ -51,29 +51,10 @@ LLViewerParcelMediaAutoPlay::LLViewerParcelMediaAutoPlay() : { } -static LLViewerParcelMediaAutoPlay *sAutoPlay = NULL; - -// static -void LLViewerParcelMediaAutoPlay::initClass() -{ - if (!sAutoPlay) - sAutoPlay = new LLViewerParcelMediaAutoPlay; -} - -// static -void LLViewerParcelMediaAutoPlay::cleanupClass() -{ - if (sAutoPlay) - delete sAutoPlay; -} - // static void LLViewerParcelMediaAutoPlay::playStarted() { - if (sAutoPlay) - { - sAutoPlay->mPlayed = TRUE; - } + LLSingleton<LLViewerParcelMediaAutoPlay>::getInstance()->mPlayed = TRUE; } BOOL LLViewerParcelMediaAutoPlay::tick() diff --git a/indra/newview/llviewerparcelmediaautoplay.h b/indra/newview/llviewerparcelmediaautoplay.h index a052362829..33565307f2 100644 --- a/indra/newview/llviewerparcelmediaautoplay.h +++ b/indra/newview/llviewerparcelmediaautoplay.h @@ -31,13 +31,11 @@ #include "lluuid.h" // timer to automatically play media -class LLViewerParcelMediaAutoPlay : LLEventTimer +class LLViewerParcelMediaAutoPlay : LLEventTimer, public LLSingleton<LLViewerParcelMediaAutoPlay> { - public: - LLViewerParcelMediaAutoPlay(); + LLSINGLETON(LLViewerParcelMediaAutoPlay); +public: virtual BOOL tick(); - static void initClass(); - static void cleanupClass(); static void playStarted(); private: diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b8960d7604..543d17eb41 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1775,7 +1775,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) // Get the real window rect the window was created with (since there are various OS-dependent reasons why // the size of a window or fullscreen context may have been adjusted slightly...) - F32 ui_scale_factor = llclamp(gSavedSettings.getF32("UIScaleFactor"), MIN_UI_SCALE, MAX_UI_SCALE) * mWindow->getSystemUISize(); + F32 ui_scale_factor = llclamp(gSavedSettings.getF32("UIScaleFactor") * mWindow->getSystemUISize(), MIN_UI_SCALE, MAX_UI_SCALE); mDisplayScale.setVec(llmax(1.f / mWindow->getPixelAspectRatio(), 1.f), llmax(mWindow->getPixelAspectRatio(), 1.f)); mDisplayScale *= ui_scale_factor; @@ -1796,8 +1796,6 @@ LLViewerWindow::LLViewerWindow(const Params& p) // LL_DEBUGS("Window") << "Loading feature tables." << LL_ENDL; - LLFeatureManager::getInstance()->init(); - // Initialize OpenGL Renderer if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") || !gGLManager.mHasVertexBufferObject) @@ -4620,7 +4618,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei if ((image_width <= gGLManager.mGLMaxTextureSize && image_height <= gGLManager.mGLMaxTextureSize) && (image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui) { - if (scratch_space.allocate(image_width, image_height, GL_RGBA, true, true)) + if (scratch_space.allocate(image_width, image_height, GL_DEPTH_COMPONENT, true, true)) { original_width = gPipeline.mDeferredScreen.getWidth(); original_height = gPipeline.mDeferredScreen.getHeight(); @@ -5348,7 +5346,7 @@ F32 LLViewerWindow::getWorldViewAspectRatio() const void LLViewerWindow::calcDisplayScale() { - F32 ui_scale_factor = llclamp(gSavedSettings.getF32("UIScaleFactor"), MIN_UI_SCALE, MAX_UI_SCALE) * mWindow->getSystemUISize(); + F32 ui_scale_factor = llclamp(gSavedSettings.getF32("UIScaleFactor") * mWindow->getSystemUISize(), MIN_UI_SCALE, MAX_UI_SCALE); LLVector2 display_scale; display_scale.setVec(llmax(1.f / mWindow->getPixelAspectRatio(), 1.f), llmax(mWindow->getPixelAspectRatio(), 1.f)); display_scale *= ui_scale_factor; diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index fb28d9bdb5..0e6511f6b5 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -1045,14 +1045,15 @@ const char* object_cache_dirname = "objectcache"; const char* header_filename = "object.cache"; -LLVOCache::LLVOCache(): +LLVOCache::LLVOCache(ELLPath location, U32 size, U32 cache_version, bool read_only) : mInitialized(false), - mReadOnly(true), + mReadOnly(read_only), mNumEntries(0), mCacheSize(1) { mEnabled = gSavedSettings.getBOOL("ObjectCacheEnabled"); mLocalAPRFilePoolp = new LLVolatileAPRPool() ; + initCache(location, size, cache_version); } LLVOCache::~LLVOCache() diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index 594d38249b..41b5246480 100644 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -221,9 +221,9 @@ private: // //Note: LLVOCache is not thread-safe // -class LLVOCache : public LLSingleton<LLVOCache> +class LLVOCache : public LLParamSingleton<LLVOCache> { - LLSINGLETON(LLVOCache); + LLSINGLETON(LLVOCache, ELLPath location, U32 size, U32 cache_version, bool read_only); ~LLVOCache() ; private: @@ -259,19 +259,18 @@ private: typedef std::map<U64, HeaderEntryInfo*> handle_entry_map_t; public: - void initCache(ELLPath location, U32 size, U32 cache_version) ; void removeCache(ELLPath location, bool started = false) ; void readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) ; void writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache, bool removal_enabled); void removeEntry(U64 handle) ; - void setReadOnly(bool read_only) {mReadOnly = read_only;} - U32 getCacheEntries() { return mNumEntries; } U32 getCacheEntriesMax() { return mCacheSize; } private: + void initCache(ELLPath location, U32 size, U32 cache_version); + void setDirNames(ELLPath location); // determine the cache filename for the region from the region handle void getObjectCacheFilename(U64 handle, std::string& filename); diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 5c107cc10b..d8c8cb0461 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -116,7 +116,7 @@ std::string LLVoiceClientStatusObserver::status2string(LLVoiceClientStatusObserv /////////////////////////////////////////////////////////////////////////////////////////////// -LLVoiceClient::LLVoiceClient() +LLVoiceClient::LLVoiceClient(LLPumpIO *pump) : mVoiceModule(NULL), m_servicePump(NULL), @@ -133,6 +133,7 @@ LLVoiceClient::LLVoiceClient() mDisableMic(false) { updateSettings(); + init(pump); } //--------------------------------------------------- diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index 758e9cecd7..f95b853c31 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -310,9 +310,9 @@ public: }; -class LLVoiceClient: public LLSingleton<LLVoiceClient> +class LLVoiceClient: public LLParamSingleton<LLVoiceClient> { - LLSINGLETON(LLVoiceClient); + LLSINGLETON(LLVoiceClient, LLPumpIO *pump); LOG_CLASS(LLVoiceClient); ~LLVoiceClient(); @@ -320,7 +320,6 @@ public: typedef boost::signals2::signal<void(void)> micro_changed_signal_t; micro_changed_signal_t mMicroChangedSignal; - void init(LLPumpIO *pump); // Call this once at application startup (creates connector) void terminate(); // Call this to clean up during shutdown const LLVoiceVersionInfo getVersion(); @@ -472,6 +471,8 @@ public: // Returns NULL if voice effects are not supported, or not enabled. LLVoiceEffectInterface* getVoiceEffectInterface() const; //@} +private: + void init(LLPumpIO *pump); protected: LLVoiceModuleInterface* mVoiceModule; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 88058c28a6..ddffeffdca 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5531,6 +5531,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) U32 mask = mat->getShaderMask(alpha_mode); pool->addRiggedFace(facep, mask); } + + if(vobj->isAnimatedObject() && vobj->isRiggedMesh()) + { + pool->updateRiggedVertexBuffers(vobj->getAvatar()); + } } else if (mat) { diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index a90256fa4b..9bc3a2a33b 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -887,14 +887,8 @@ void LLWorldMapView::drawFrustum() F32 half_width_pixels = half_width_meters * meters_to_pixels; // Compute the frustum coordinates. Take the UI scale into account. -#if defined(LL_DARWIN) - F32 ui_scale_factor = gSavedSettings.getF32("UIScaleFactor"); - F32 ctr_x = ((getLocalRect().getWidth() * 0.5f + sPanX) * ui_scale_factor) * LLUI::getScaleFactor().mV[VX]; - F32 ctr_y = ((getLocalRect().getHeight() * 0.5f + sPanY) * ui_scale_factor) * LLUI::getScaleFactor().mV[VY]; -#else F32 ctr_x = ((getLocalRect().getWidth() * 0.5f + sPanX) * LLUI::getScaleFactor().mV[VX]); F32 ctr_y = ((getLocalRect().getHeight() * 0.5f + sPanY) * LLUI::getScaleFactor().mV[VY]); -#endif gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); diff --git a/indra/newview/skins/default/xui/en/panel_tools_texture.xml b/indra/newview/skins/default/xui/en/panel_tools_texture.xml index 67b99ca588..90f32ae452 100644 --- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml @@ -770,6 +770,17 @@ tool_tip="Align textures on all selected faces with the last selected face. Requires Planar texture mapping." top_delta="16" width="260" /> + <button + left="10" + top="222" + height="20" + label="Align" + label_selected="Align current texture layers" + layout="topleft" + name="button align textures" + top_delta="0" + tool_tip="Align current texture layers" + width="66" /> <web_browser visible="false" enabled="false" |