diff --git a/autobuild.xml b/autobuild.xml index 0b7450f402..d595494a60 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -978,11 +978,11 @@ archive hash - 87a94446fed5e9bdaf7bb4f9b0c21574 + ee3c5e3449e06bc3dbb1c9dc29aca53d hash_algorithm md5 url - file:///opt/firestorm/fmodstudio-2.01.04-linux64-202721507.tar.bz2 + file:///opt/firestorm/fmodstudio-2.01.05-linux64-202931144.tar.bz2 name linux64 diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 54872e86f8..942feb6c22 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -150,13 +150,13 @@ LLOSInfo::LLOSInfo() : #if LL_WINDOWS - if (IsWindowsVersionOrGreater(10, 0, 0)) + if (IsWindows10OrGreater()) { mMajorVer = 10; mMinorVer = 0; if (IsWindowsServer()) { - mOSStringSimple = "Windows Server 2016 "; + mOSStringSimple = "Windows Server "; } else { diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 3827224dbb..beed5a2c51 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -1096,7 +1096,12 @@ LLRender::LLRender() //mQuadCycle(0), // Remove QUADS rendering mode mMode(LLRender::TRIANGLES), mCurrTextureUnitIndex(0), - mMaxAnisotropy(0.f) + mMaxAnisotropy(0.f), + mLineWidth(1.f), // Line width OGL core profile fix by Rye Mutt + // Don't ignore OpenGL max line width + mMaxLineWidthSmooth(1.f), + mMaxLineWidthAliased(1.f) + // { mTexUnits.reserve(LL_NUM_TEXTURE_LAYERS); for (U32 i = 0; i < LL_NUM_TEXTURE_LAYERS; i++) @@ -1162,6 +1167,16 @@ void LLRender::init() initVB(); // stop_glerror(); + + // Don't ignore OpenGL max line width + GLint range[2]; + glGetIntegerv(GL_ALIASED_LINE_WIDTH_RANGE, range); + stop_glerror(); + mMaxLineWidthAliased = F32(range[1]); + glGetIntegerv(GL_SMOOTH_LINE_WIDTH_RANGE, range); + stop_glerror(); + mMaxLineWidthSmooth = F32(range[1]); + // } void LLRender::shutdown() @@ -1888,6 +1903,29 @@ void LLRender::setAmbientLightColor(const LLColor4& color) } } +// Line width OGL core profile fix by Rye Mutt +void LLRender::setLineWidth(F32 line_width) +{ + if (LLRender::sGLCoreProfile) + { + line_width = 1.f; + } + else if (line_width > 1.f) + { + line_width = llmin(line_width, glIsEnabled(GL_LINE_SMOOTH) ? mMaxLineWidthSmooth : mMaxLineWidthAliased); + } + if (mLineWidth != line_width || mDirty) + { + if (mMode == LLRender::LINES || mMode == LLRender::LINE_STRIP) + { + flush(); + } + mLineWidth = line_width; + glLineWidth(line_width); + } +} +// + bool LLRender::verifyTexUnitActive(U32 unitToVerify) { if (mCurrTextureUnitIndex == unitToVerify) diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index f7dca80135..8499563838 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -456,6 +456,8 @@ public: LLLightState* getLight(U32 index); void setAmbientLightColor(const LLColor4& color); + void setLineWidth(F32 line_width); // Line width OGL core profile fix by Rye Mutt + LLTexUnit* getTexUnit(U32 index); U32 getCurrentTexUnitIndex(void) const { return mCurrTextureUnitIndex; } @@ -499,6 +501,11 @@ private: bool mCurrColorMask[4]; eCompareFunc mCurrAlphaFunc; F32 mCurrAlphaFuncVal; + F32 mLineWidth; // Line width OGL core profile fix by Rye Mutt + // Don't ignore OpenGL max line width + F32 mMaxLineWidthSmooth; + F32 mMaxLineWidthAliased; + // LLPointer mBuffer; LLStrider mVerticesp; diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp index bbdad1201e..c9e205723e 100644 --- a/indra/llrender/llrender2dutils.cpp +++ b/indra/llrender/llrender2dutils.cpp @@ -972,7 +972,7 @@ void gl_stippled_line_3d( const LLVector3& start, const LLVector3& end, const LL gGL.color4f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE], color.mV[VALPHA]); gGL.flush(); - glLineWidth(2.5f); + gGL.setLineWidth(2.5f); // Line width OGL core profile fix by Rye Mutt if (!LLGLSLShader::sNoFixedFunction) { @@ -2072,8 +2072,10 @@ void LLRender2D::setScaleFactor(const LLVector2 &scale_factor) void LLRender2D::setLineWidth(F32 width) { - gGL.flush(); - glLineWidth(width * lerp(mGLScaleFactor.mV[VX], mGLScaleFactor.mV[VY], 0.5f)); + // Line width OGL core profile fix by Rye Mutt + //gGL.flush(); + //glLineWidth(width * lerp(mGLScaleFactor.mV[VX], mGLScaleFactor.mV[VY], 0.5f)); + gGL.setLineWidth(width * lerp(mGLScaleFactor.mV[VX], mGLScaleFactor.mV[VY], 0.5f)); } LLPointer LLRender2D::getUIImageByID(const LLUUID& image_id, S32 priority) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index d81a2ac887..3fea76eb1d 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -4051,25 +4051,54 @@ void LLTearOffMenu::closeTearOff() } LLContextMenuBranch::LLContextMenuBranch(const LLContextMenuBranch::Params& p) -: LLMenuItemGL(p), - mBranch( p.branch()->getHandle() ) +: LLMenuItemGL(p) + //mBranch( p.branch()->getHandle() ) // Context menu memory leak fix by Rye Mutt { - mBranch.get()->hide(); - mBranch.get()->setParentMenuItem(this); + // Context menu memory leak fix by Rye Mutt + //mBranch.get()->hide(); + //mBranch.get()->setParentMenuItem(this); + // + LLContextMenu* branch = static_cast(p.branch); + if (branch) + { + mBranch = branch->getHandle(); + branch->hide(); + branch->setParentMenuItem(this); + } } +// Context menu memory leak fix by Rye Mutt +LLContextMenuBranch::~LLContextMenuBranch() +{ + if (mBranch.get()) + { + mBranch.get()->die(); + } +} +// + // called to rebuild the draw label void LLContextMenuBranch::buildDrawLabel( void ) { + // Context menu memory leak fix by Rye Mutt + auto menu = getBranch(); + if (menu) + // { // default enablement is this -- if any of the subitems are // enabled, this item is enabled. JC - U32 sub_count = mBranch.get()->getItemCount(); + // Context menu memory leak fix by Rye Mutt + //U32 sub_count = mBranch.get()->getItemCount(); + U32 sub_count = menu->getItemCount(); + // U32 i; BOOL any_enabled = FALSE; for (i = 0; i < sub_count; i++) { - LLMenuItemGL* item = mBranch.get()->getItem(i); + // Context menu memory leak fix by Rye Mutt + //LLMenuItemGL* item = mBranch.get()->getItem(i); + LLMenuItemGL* item = menu->getItem(i); + // item->buildDrawLabel(); if (item->getEnabled() && !item->getDrawTextDisabled() ) { @@ -4091,14 +4120,28 @@ void LLContextMenuBranch::buildDrawLabel( void ) void LLContextMenuBranch::showSubMenu() { - LLMenuItemGL* menu_item = mBranch.get()->getParentMenuItem(); - if (menu_item != NULL && menu_item->getVisible()) + // Context menu memory leak fix by Rye Mutt + //LLMenuItemGL* menu_item = mBranch.get()->getParentMenuItem(); + //if (menu_item != NULL && menu_item->getVisible()) + //{ + // S32 center_x; + // S32 center_y; + // localPointToScreen(getRect().getWidth(), getRect().getHeight() , ¢er_x, ¢er_y); + // mBranch.get()->show(center_x, center_y); + //} + auto menu = getBranch(); + if (menu) { - S32 center_x; - S32 center_y; - localPointToScreen(getRect().getWidth(), getRect().getHeight() , ¢er_x, ¢er_y); - mBranch.get()->show(center_x, center_y); + LLMenuItemGL* menu_item = menu->getParentMenuItem(); + if (menu_item != NULL && menu_item->getVisible()) + { + S32 center_x; + S32 center_y; + localPointToScreen(getRect().getWidth(), getRect().getHeight() , ¢er_x, ¢er_y); + menu->show(center_x, center_y); + } } + // } // onCommit() - do the primary funcationality of the menu item. @@ -4111,14 +4154,28 @@ void LLContextMenuBranch::setHighlight( BOOL highlight ) { if (highlight == getHighlight()) return; LLMenuItemGL::setHighlight(highlight); - if( highlight ) + // Context menu memory leak fix by Rye Mutt + //if( highlight ) + //{ + // showSubMenu(); + //} + //else + //{ + // mBranch.get()->hide(); + //} + auto menu = getBranch(); + if (menu) { - showSubMenu(); - } - else - { - mBranch.get()->hide(); + if (highlight) + { + showSubMenu(); + } + else + { + menu->hide(); + } } + // } diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 6d0c3659d7..8e805328b2 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -754,8 +754,11 @@ public: LLContextMenuBranch(const Params&); - virtual ~LLContextMenuBranch() - {} + // Context menu memory leak fix by Rye Mutt + //virtual ~LLContextMenuBranch() + //{} + virtual ~LLContextMenuBranch(); + // // called to rebuild the draw label virtual void buildDrawLabel( void ); diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index f2959e60ad..09d3658ecc 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1559,9 +1559,9 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO if (wglCreateContextAttribsARB) { //attempt to create a specific versioned context S32 attribs[] = - { //start at 4.2 + { //start at 4.6 WGL_CONTEXT_MAJOR_VERSION_ARB, 4, - WGL_CONTEXT_MINOR_VERSION_ARB, 2, + WGL_CONTEXT_MINOR_VERSION_ARB, 6, WGL_CONTEXT_PROFILE_MASK_ARB, LLRender::sGLCoreProfile ? WGL_CONTEXT_CORE_PROFILE_BIT_ARB : WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB, WGL_CONTEXT_FLAGS_ARB, gDebugGL ? WGL_CONTEXT_DEBUG_BIT_ARB : 0, 0 diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a686248543..6322ac0fb0 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -25241,5 +25241,16 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 + FSAllowWaterDistortionOcclusion + + Comment + If allowed, object occlusion setting will be restored for generation the water reflection distortion. This was allowed pre-EEP and got disabled for EEP. While generation is more exact without occlusion, it can cause a huge performance impact. + Persist + 1 + Type + Boolean + Value + 0 + diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index aed51cfc36..77c2fedfa9 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1501,7 +1501,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) // Add avatar hitbox debug static LLCachedControl render_hitbox(gSavedSettings, "DebugRenderHitboxes", false); - if (render_hitbox && pass == 1) + if (render_hitbox && pass == 2) { LLGLSLShader* current_shader_program = NULL; @@ -1516,25 +1516,15 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) LLGLEnable blend(GL_BLEND); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - // save current world matrix - gGL.matrixMode(LLRender::MM_MODELVIEW); - gGL.pushMatrix(); - LLColor4 avatar_color = LLNetMap::getAvatarColor(avatarp->getID()); gGL.diffuseColor4f(avatar_color.mV[VRED], avatar_color.mV[VGREEN], avatar_color.mV[VBLUE], avatar_color.mV[VALPHA]); - glLineWidth(2.0f); + gGL.setLineWidth(2.0f); LLQuaternion rot = avatarp->getRotationRegion(); LLVector3 pos = avatarp->getPositionAgent(); LLVector3 size = avatarp->getScale(); - - // *NOTE: Tried this so I wouldn't have to duplcate code, but I didn't find a way to rotate - // the matrix by "rot" so the drawBoxOutline function would do the right thing. So - // I settled for copying the code and rotating the 4 corner points individually. -Zi - // gGL.translatef(pos.mV[VX],pos.mV[VY],pos.mV[VZ]); - // gGL.rotatef(rot.mQ[VS]*RAD_TO_DEG,rot.mQ[VX],rot.mQ[VY],rot.mQ[VZ]); - // drawBoxOutline(LLVector3::zero,size/2.0); - // // drawBoxOutline partly copied from llspatialpartition.cpp below + + // drawBoxOutline partly copied from llspatialpartition.cpp below // set up and rotate hitbox to avatar orientation, half the avatar scale in either direction LLVector3 v1 = size.scaledVec(LLVector3( 0.5f, 0.5f, 0.5f)) * rot; @@ -1581,9 +1571,6 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) gGL.end(); - // restore world matrix - gGL.popMatrix(); - // unload debug shader if (LLGLSLShader::sNoFixedFunction) { diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 8a16b8e766..6576ab783a 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -716,7 +716,7 @@ void LLFace::renderOneWireframe(const LLColor4 &color, F32 fogCfx, bool wirefram LLGLEnable offset(GL_POLYGON_OFFSET_LINE); glPolygonOffset(3.f, 3.f); - glLineWidth(5.f); + gGL.setLineWidth(5.f); // Line width OGL core profile fix by Rye Mutt glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); renderFace(mDrawablep, this); } diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 1a36962343..31c26e29ac 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -1095,8 +1095,10 @@ void LLFastTimerView::drawLineGraph() //fatten highlighted timer if (mHoverID == idp) { - gGL.flush(); - glLineWidth(3); + // Line width OGL core profile fix by Rye Mutt + //gGL.flush(); + //glLineWidth(3); + gGL.setLineWidth(3.f); } llassert(idp->getIndex() < sTimerColors.size()); @@ -1155,8 +1157,10 @@ void LLFastTimerView::drawLineGraph() if (mHoverID == idp) { - gGL.flush(); - glLineWidth(1); + // Line width OGL core profile fix by Rye Mutt + //gGL.flush(); + //glLineWidth(1); + gGL.setLineWidth(1.f); } if (idp->getTreeNode().mCollapsed) diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 9d4568dcf1..5f0358b41a 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -950,8 +950,10 @@ void LLViewerObjectList::renderObjectBeacons() S32 line_width = debug_beacon.mLineWidth; if (line_width != last_line_width) { - gGL.flush(); - glLineWidth( (F32)line_width ); + // Line width OGL core profile fix by Rye Mutt + //gGL.flush(); + //glLineWidth( (F32)line_width ); + gGL.setLineWidth((F32)line_width); last_line_width = line_width; } @@ -980,8 +982,10 @@ void LLViewerObjectList::renderObjectBeacons() S32 line_width = debug_beacon.mLineWidth; if (line_width != last_line_width) { - gGL.flush(); - glLineWidth( (F32)line_width ); + // Line width OGL core profile fix by Rye Mutt + //gGL.flush(); + //glLineWidth( (F32)line_width ); + gGL.setLineWidth((F32)line_width); last_line_width = line_width; } @@ -994,8 +998,10 @@ void LLViewerObjectList::renderObjectBeacons() gGL.end(); } - gGL.flush(); - glLineWidth(1.f); + // Line width OGL core profile fix by Rye Mutt + //gGL.flush(); + //glLineWidth(1.f); + gGL.setLineWidth(1.f); for (std::vector::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter) { @@ -1033,7 +1039,7 @@ void LLSky::renderSunMoonBeacons(const LLVector3& pos_agent, const LLVector3& di { pos_end.mV[i] = pos_agent.mV[i] + (50 * direction.mV[i]); } - glLineWidth(LLPipeline::DebugBeaconLineWidth); + gGL.setLineWidth(LLPipeline::DebugBeaconLineWidth); // Line width OGL core profile fix by Rye Mutt gGL.begin(LLRender::LINES); color.mV[3] *= 0.5f; gGL.color4fv(color.mV); @@ -1044,7 +1050,7 @@ void LLSky::renderSunMoonBeacons(const LLVector3& pos_agent, const LLVector3& di gGL.end(); gGL.flush(); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt } diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index 8f63a0ada1..351381640f 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -225,7 +225,6 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp) } mViewOption["show_textures"] = false; - mViewOption["verbose_logging"] = mImporterDebug;// initialise verbose logging from debug fmp->childSetValue("verbose_logging", LLSD(mImporterDebug)); mFMP = fmp; @@ -2974,13 +2973,6 @@ BOOL LLModelPreview::render() assert_main_thread(); LLMutexLock lock(this); - // enable the import debug importer debug control - if(mNeedsUpdate) - { - bool verbose_logging = mViewOption["verbose_logging"]; - gSavedSettings.setBOOL("ImporterDebug",verbose_logging); - } - // mNeedsUpdate = FALSE; bool use_shaders = LLGLSLShader::sNoFixedFunction; @@ -3314,11 +3306,11 @@ BOOL LLModelPreview::render() gGL.diffuseColor4fv(PREVIEW_EDGE_COL.mV); if (edges) { - glLineWidth(PREVIEW_EDGE_WIDTH); + gGL.setLineWidth(PREVIEW_EDGE_WIDTH); // Line width OGL core profile fix by Rye Mutt glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt } } gGL.popMatrix(); @@ -3431,12 +3423,12 @@ BOOL LLModelPreview::render() buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0); gGL.diffuseColor4fv(PREVIEW_PSYH_EDGE_COL.mV); - glLineWidth(PREVIEW_PSYH_EDGE_WIDTH); + gGL.setLineWidth(PREVIEW_PSYH_EDGE_WIDTH); // Line width OGL core profile fix by Rye Mutt glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt } } } @@ -3446,7 +3438,7 @@ BOOL LLModelPreview::render() // only do this if mDegenerate was set in the preceding mesh checks [Check this if the ordering ever breaks] if (mHasDegenerate) { - glLineWidth(PREVIEW_DEG_EDGE_WIDTH); + gGL.setLineWidth(PREVIEW_DEG_EDGE_WIDTH); // Line width OGL core profile fix by Rye Mutt glPointSize(PREVIEW_DEG_POINT_SIZE); gPipeline.enableLightsFullbright(); //show degenerate triangles @@ -3518,7 +3510,7 @@ BOOL LLModelPreview::render() gGL.popMatrix(); } - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt glPointSize(1.f); gPipeline.enableLightsPreview(); gGL.setSceneBlendType(LLRender::BT_ALPHA); @@ -3679,11 +3671,11 @@ BOOL LLModelPreview::render() if (edges) { gGL.diffuseColor4fv(PREVIEW_EDGE_COL.mV); - glLineWidth(PREVIEW_EDGE_WIDTH); + gGL.setLineWidth(PREVIEW_EDGE_WIDTH); // Line width OGL core profile fix by Rye Mutt glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); buffer->draw(LLRender::TRIANGLES, buffer->getNumIndices(), 0); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt } } } diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index f0eafeb38a..e50a8ae999 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -1894,16 +1894,18 @@ LLColor4 LLNetMap::getAvatarColor(const LLUUID& avatar_id) { static LLUIColor map_avatar_color = LLUIColorTable::instance().getColor("MapAvatarColor", LLColor4::white); LLColor4 color = map_avatar_color; - + + LGGContactSets& cs_instance = LGGContactSets::instance(); + // Color "special" avatars with special colors (Friends, muted, Lindens, etc) - color = LGGContactSets::getInstance()->colorize(avatar_id, color, LGG_CS_MINIMAP); + color = cs_instance.colorize(avatar_id, color, LGG_CS_MINIMAP); // Color based on contact sets prefs - if(LGGContactSets::getInstance()->hasFriendColorThatShouldShow(avatar_id, LGG_CS_MINIMAP)) + if (cs_instance.hasFriendColorThatShouldShow(avatar_id, LGG_CS_MINIMAP)) { - color = LGGContactSets::getInstance()->getFriendColor(avatar_id); + color = cs_instance.getFriendColor(avatar_id); } - + // Mark Avatars with special colors avatar_marks_map_t::iterator found = sAvatarMarksMap.find(avatar_id); if (found != sAvatarMarksMap.end()) diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index eab23eeae9..f95ce290ee 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6235,7 +6235,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) gGL.popMatrix(); gGL.popMatrix(); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); if (shader) diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index eb46895b10..8ccc93d8c6 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -243,11 +243,11 @@ void LLSnapshotLivePreview::drawPreviewRect(S32 offset_x, S32 offset_y) { F32 line_width ; glGetFloatv(GL_LINE_WIDTH, &line_width) ; - glLineWidth(2.0f * line_width) ; + gGL.setLineWidth(2.0f * line_width) ; // Line width OGL core profile fix by Rye Mutt LLColor4 color(0.0f, 0.0f, 0.0f, 1.0f) ; gl_rect_2d( mPreviewRect.mLeft + offset_x, mPreviewRect.mTop + offset_y, mPreviewRect.mRight + offset_x, mPreviewRect.mBottom + offset_y, color, FALSE ) ; - glLineWidth(line_width) ; + gGL.setLineWidth(line_width) ; // Line width OGL core profile fix by Rye Mutt //draw four alpha rectangles to cover areas outside of the snapshot image if(!mKeepAspectRatio) diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index f9e66d9fe0..1ef5e60a98 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1738,12 +1738,12 @@ void renderOctree(LLSpatialGroup* group) gGL.diffuseColor4f(1,0,0,group->mBuilt); gGL.flush(); - glLineWidth(5.f); + gGL.setLineWidth(5.f); // Line width OGL core profile fix by Rye Mutt const LLVector4a* bounds = group->getObjectBounds(); drawBoxOutline(bounds[0], bounds[1]); gGL.flush(); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt gGL.flush(); for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { @@ -1880,10 +1880,10 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera) pushBufferVerts(group, LLVertexBuffer::MAP_VERTEX, false); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - glLineWidth(4.f); + gGL.setLineWidth(4.f); // Line width OGL core profile fix by Rye Mutt gGL.diffuseColor4f(0.f, 0.5f, 0.f, 1.f); pushBufferVerts(group, LLVertexBuffer::MAP_VERTEX, false); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); bool selected = false; @@ -2257,12 +2257,12 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE) if (vobj && vobj->onActiveList()) { gGL.flush(); - glLineWidth(llmax(4.f*sinf(gFrameTimeSeconds*2.f)+1.f, 1.f)); - //glLineWidth(4.f*(sinf(gFrameTimeSeconds*2.f)*0.25f+0.75f)); + gGL.setLineWidth(llmax(4.f*sinf(gFrameTimeSeconds*2.f)+1.f, 1.f)); // Line width OGL core profile fix by Rye Mutt + //gGL.setLineWidth(4.f*(sinf(gFrameTimeSeconds*2.f)*0.25f+0.75f)); // Line width OGL core profile fix by Rye Mutt stop_glerror(); drawBoxOutline(pos,size); gGL.flush(); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt } else { @@ -2462,10 +2462,10 @@ void render_hull(LLModel::PhysicsMesh& mesh, const LLColor4& color, const LLColo LLGLEnable offset(GL_POLYGON_OFFSET_LINE); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glPolygonOffset(3.f, 3.f); - glLineWidth(3.f); + gGL.setLineWidth(3.f); // Line width OGL core profile fix by Rye Mutt gGL.diffuseColor4fv(line_color.mV); LLVertexBuffer::drawArrays(LLRender::TRIANGLES, mesh.mPositions, mesh.mNormals); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); } @@ -3237,7 +3237,7 @@ public: if (i == 1) { gGL.flush(); - glLineWidth(3.f); + gGL.setLineWidth(3.f); // Line width OGL core profile fix by Rye Mutt } gGL.begin(LLRender::TRIANGLES); @@ -3256,7 +3256,7 @@ public: if (i == 1) { gGL.flush(); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt } } } @@ -3860,11 +3860,11 @@ void LLSpatialPartition::renderPhysicsShapes() gGL.flush(); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - glLineWidth(3.f); + gGL.setLineWidth(3.f); // Line width OGL core profile fix by Rye Mutt LLOctreeRenderPhysicsShapes render_physics(camera); render_physics.traverse(mOctree); gGL.flush(); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt } void LLSpatialPartition::renderDebug() diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 011203494d..695e7a0e96 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -588,6 +588,7 @@ void LLStatusBar::refresh() } // Pathfinding rebake functions + LLMenuOptionPathfindingRebakeNavmesh& navmesh = LLMenuOptionPathfindingRebakeNavmesh::instance(); static LLMenuOptionPathfindingRebakeNavmesh::ERebakeNavMeshMode pathfinding_mode = LLMenuOptionPathfindingRebakeNavmesh::kRebakeNavMesh_Default; LLViewerRegion* current_region = gAgent.getRegion(); @@ -597,7 +598,7 @@ void LLStatusBar::refresh() bakingStarted = false; mRebakeStuck = false; } - if (LLMenuOptionPathfindingRebakeNavmesh::getInstance()->isRebaking()) + if (navmesh.isRebaking()) { if (!bakingStarted) { @@ -615,9 +616,9 @@ void LLStatusBar::refresh() updateParcelIcons(); } } - else if (pathfinding_mode != LLMenuOptionPathfindingRebakeNavmesh::getInstance()->getMode()) + else if (pathfinding_mode != navmesh.getMode()) { - pathfinding_mode = LLMenuOptionPathfindingRebakeNavmesh::getInstance()->getMode(); + pathfinding_mode = navmesh.getMode(); updateParcelIcons(); } // @@ -1382,9 +1383,10 @@ void LLStatusBar::updateParcelIcons() bool is_for_sale = (!current_parcel->isPublic() && vpm->canAgentBuyParcel(current_parcel, false)); bool pathfinding_dynamic_enabled = agent_region->dynamicPathfindingEnabled(); - bool pathfinding_navmesh_dirty = LLMenuOptionPathfindingRebakeNavmesh::getInstance()->isRebakeNeeded(); + LLMenuOptionPathfindingRebakeNavmesh& navmesh = LLMenuOptionPathfindingRebakeNavmesh::instance(); + bool pathfinding_navmesh_dirty = navmesh.isRebakeNeeded(); F32 pathfinding_dirty_icon_alpha = 1.0f; - if (LLMenuOptionPathfindingRebakeNavmesh::getInstance()->isRebaking()) + if (navmesh.isRebaking()) { // Stop the blinking after a while if (mRebakeStuck) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 252cdcb449..3917292ee7 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -782,19 +782,23 @@ public: addText(xpos, ypos, "View Matrix"); ypos += y_inc; } - // - //if (gSavedSettings.getBOOL("DebugShowColor") && !LLRender::sNsightDebugSupport) - //static LLCachedControl debugShowColor(gSavedSettings, "DebugShowColor"); - static LLCachedControl debugShowColor(gSavedSettings, "DebugShowColor"); - // - if (debugShowColor && !LLRender::sNsightDebugSupport) - { - U8 color[4]; - LLCoordGL coord = gViewerWindow->getCurrentMouse(); - glReadPixels(coord.mX, coord.mY, 1,1,GL_RGBA, GL_UNSIGNED_BYTE, color); - addText(xpos, ypos, llformat("%d %d %d %d", color[0], color[1], color[2], color[3])); - ypos += y_inc; - } + // + //static LLCachedControl debugShowColor(gSavedSettings, "DebugShowColor"); + static LLCachedControl debugShowColor(gSavedSettings, "DebugShowColor"); + if (debugShowColor && !LLRender::sNsightDebugSupport) + // + { + U8 color[4]; + LLCoordGL coord = gViewerWindow->getCurrentMouse(); + + // Convert x,y to raw pixel coords + S32 x_raw = llround(coord.mX * gViewerWindow->getWindowWidthRaw() / (F32) gViewerWindow->getWindowWidthScaled()); + S32 y_raw = llround(coord.mY * gViewerWindow->getWindowHeightRaw() / (F32) gViewerWindow->getWindowHeightScaled()); + + glReadPixels(x_raw, y_raw, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, color); + addText(xpos, ypos, llformat("Pixel <%1d, %1d> R:%1d G:%1d B:%1d A:%1d", x_raw, y_raw, color[0], color[1], color[2], color[3])); + ypos += y_inc; + } // FIRE-29880: Movelock static LLCachedControl fsRenderMovelockState(gSavedPerAccountSettings, "UseMoveLock"); @@ -4367,7 +4371,7 @@ void renderMeshPhysicsTriangles(const LLColor4& color, const LLColor4& line_colo LLGLEnable offset(GL_POLYGON_OFFSET_FILL); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glPolygonOffset(offset_factor, offset_units); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt LLVertexBuffer::drawArrays(LLRender::TRIANGLES, decomp->mPhysicsShapeMesh.mPositions, decomp->mPhysicsShapeMesh.mNormals); } { @@ -4375,7 +4379,7 @@ void renderMeshPhysicsTriangles(const LLColor4& color, const LLColor4& line_colo LLGLEnable offset(GL_POLYGON_OFFSET_LINE); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glPolygonOffset(offset_factor, offset_units); - glLineWidth(3.f); + gGL.setLineWidth(3.f); // Line width OGL core profile fix by Rye Mutt LLVertexBuffer::drawArrays(LLRender::TRIANGLES, decomp->mPhysicsShapeMesh.mPositions, decomp->mPhysicsShapeMesh.mNormals); } } @@ -4403,12 +4407,12 @@ void renderMeshPhysicsTriangles(const LLColor4& color, const LLColor4& line_colo LLVertexBuffer::drawArrays(LLRender::TRIANGLES, decomp->mPhysicsShapeMesh.mPositions, decomp->mPhysicsShapeMesh.mNormals); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); gGL.diffuseColor4fv(line_color.mV); - glLineWidth(3.f); + gGL.setLineWidth(3.f); // Line width OGL core profile fix by Rye Mutt LLVertexBuffer::drawArrays(LLRender::TRIANGLES, decomp->mPhysicsShapeMesh.mPositions, decomp->mPhysicsShapeMesh.mNormals); } } - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); gGL.popMatrix(); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index d3547eb17c..8e9704d350 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5749,7 +5749,7 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color, S32 diffuse_channel) gGL.begin(LLRender::LINES); gGL.color4f(1.f,1.f,1.f,1.f); F32 thickness = llmax(F32(5.0f-5.0f*(gFrameTimeSeconds-mLastImpostorUpdateFrameTime)),1.0f); - glLineWidth(thickness); + gGL.setLineWidth(thickness); // Line width OGL core profile fix by Rye Mutt gGL.vertex3fv((pos+left-up).mV); gGL.vertex3fv((pos-left-up).mV); gGL.vertex3fv((pos-left-up).mV); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 6d2a26ec01..e1f4fe8c83 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -5122,7 +5122,7 @@ void LLPipeline::renderDebug() if ( pathfindingConsole->isRenderNavMesh() ) { gGL.flush(); - glLineWidth(2.0f); + gGL.setLineWidth(2.0f); // Line width OGL core profile fix by Rye Mutt LLGLEnable cull(GL_CULL_FACE); LLGLDisable blend(GL_BLEND); @@ -5153,7 +5153,7 @@ void LLPipeline::renderDebug() gGL.flush(); glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); - glLineWidth(1.0f); + gGL.setLineWidth(1.0f); // Line width OGL core profile fix by Rye Mutt gGL.flush(); } //User designated path @@ -5290,11 +5290,11 @@ void LLPipeline::renderDebug() gPathfindingProgram.uniform1f(sTint, 1.f); gPathfindingProgram.uniform1f(sAlphaScale, 1.f); - glLineWidth(gSavedSettings.getF32("PathfindingLineWidth")); + gGL.setLineWidth(gSavedSettings.getF32("PathfindingLineWidth")); // Line width OGL core profile fix by Rye Mutt LLGLDisable blendOut(GL_BLEND); llPathingLibInstance->renderNavMeshShapesVBO( render_order[i] ); gGL.flush(); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt } glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); @@ -5317,7 +5317,7 @@ void LLPipeline::renderDebug() LLGLEnable blend(GL_BLEND); LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_GREATER); gGL.flush(); - glLineWidth(2.0f); + gGL.setLineWidth(2.0f); // Line width OGL core profile fix by Rye Mutt LLGLEnable cull(GL_CULL_FACE); gPathfindingProgram.uniform1f(sTint, gSavedSettings.getF32("PathfindingXRayTint")); @@ -5351,7 +5351,7 @@ void LLPipeline::renderDebug() } gGL.flush(); - glLineWidth(1.0f); + gGL.setLineWidth(1.0f); // Line width OGL core profile fix by Rye Mutt } glPolygonOffset(0.f, 0.f); @@ -5616,7 +5616,7 @@ void LLPipeline::renderDebug() } /*gGL.flush(); - glLineWidth(16-i*2); + gGL.setLineWidth(16-i*2); // Line width OGL core profile fix by Rye Mutt for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) { @@ -5634,7 +5634,7 @@ void LLPipeline::renderDebug() } } gGL.flush(); - glLineWidth(1.f);*/ + gGL.setLineWidth(1.f);*/ // Line width OGL core profile fix by Rye Mutt } } @@ -9589,6 +9589,10 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) } //LLPipeline::sUseOcclusion = occlusion; + // Add option to allow object occlusion for water distortion generation + static LLCachedControl fsAllowWaterDistortionOcclusion(gSavedSettings, "FSAllowWaterDistortionOcclusion"); + LLPipeline::sUseOcclusion = fsAllowWaterDistortionOcclusion && occlusion; + // camera.setOrigin(camera_in.getOrigin()); //render distortion map diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml index 0586119681..9a095c21b6 100644 --- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml +++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml @@ -11,6 +11,7 @@ label_pad_left - padding to the left of tab button labels halign="center" font="SansSerifSmall" tab_height="21" + tabs_flashing_color="ButtonFlashBgColor" label_pad_bottom="1" label_pad_left="4"> + Текстурирование отключено, слишком много суставов: [JOINTS], максимум: [MAX] + Подстроено под неизвестный сустав [NAME] + Текстурирование отключено, слишком много [COUNT] неизвестных суставов + Модель [MODEL_NAME] загружена + Данные координат текстуры не полны. + Имя модели: @@ -50,8 +56,6 @@ - - @@ -63,8 +67,6 @@ - - @@ -76,8 +78,6 @@ - - @@ -89,11 +89,8 @@ - - - @@ -141,23 +138,34 @@ Масштаб (1=не масштабировать): Размеры: + - Только для моделей аватаров: - - - + + + + Сдвиг Z (поднять/опустить): + Слишком много кожных суставов + Модель имеет неизвестный сустав(ы) + Суставы: + [CONFLICTS] конфликтов в [JOINTS_COUNT] суставах + Переопределения положения для сустава '[JOINT]': + + + Подсказка: -Слишком много предметов используют по умолчанию (правая рука) без необходимости. +Слишком много предметов используют по умолчанию (правая кисть) без необходимости. Пожалуйста, рассмотрите возможность использования точки крепления рядом с положением предмета на теле. + + + -