From 7c95af74f195c9ec4ebc0fc0264d98cd4a85be49 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 14 Sep 2011 16:30:45 -0500 Subject: SH-2243 work in progress -- application side matrix stack management --- indra/llui/llaccordionctrltab.cpp | 2 +- indra/llui/llui.cpp | 10 +++++----- indra/llui/llview.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 6afe276379..e832b6bbeb 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -973,7 +973,7 @@ void LLAccordionCtrlTab::drawChild(const LLRect& root_rect,LLView* child) if ( root_rect.overlaps(screen_rect) && LLUI::sDirtyRect.overlaps(screen_rect)) { - glMatrixMode(GL_MODELVIEW); + gGL.matrixMode(LLRender::MM_MODELVIEW); LLUI::pushMatrix(); { LLUI::translate((F32)child->getRect().mLeft, (F32)child->getRect().mBottom, 0.f); diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 58ba9e05f5..b7894f5bf7 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -150,11 +150,11 @@ void gl_state_for_2d(S32 width, S32 height) F32 window_width = (F32) width;//gViewerWindow->getWindowWidth(); F32 window_height = (F32) height;//gViewerWindow->getWindowHeight(); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(0.0f, llmax(window_width, 1.f), 0.0f, llmax(window_height,1.f), -1.0f, 1.0f); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); + gGL.matrixMode(LLRender::MM_PROJECTION); + gGL.loadIdentity(); + gGL.ortho(0.0f, llmax(window_width, 1.f), 0.0f, llmax(window_height,1.f), -1.0f, 1.0f); + gGL.matrixMode(LLRender::MM_MODELVIEW); + gGL.loadIdentity(); stop_glerror(); } diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 659a54cc6e..c16481c1c8 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -1433,7 +1433,7 @@ void LLView::drawChild(LLView* childp, S32 x_offset, S32 y_offset, BOOL force_dr if ((childp->getVisible() && childp->getRect().isValid()) || force_draw) { - glMatrixMode(GL_MODELVIEW); + gGL.matrixMode(LLRender::MM_MODELVIEW); LLUI::pushMatrix(); { LLUI::translate((F32)childp->getRect().mLeft + x_offset, (F32)childp->getRect().mBottom + y_offset, 0.f); -- cgit v1.2.3 From 9ea41c8094695365bc7ea10165ffd54cda204e88 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 20 Sep 2011 00:54:37 -0500 Subject: SH-2243 No deprecated calls for the whole session. --- indra/llui/llui.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index b7894f5bf7..212672b809 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -992,10 +992,18 @@ void gl_rect_2d_checkerboard(const LLRect& rect, GLfloat alpha) // ...gray squares gGL.color4f( .7f, .7f, .7f, alpha ); gGL.flush(); - glPolygonStipple( checkerboard ); - LLGLEnable polygon_stipple(GL_POLYGON_STIPPLE); - gl_rect_2d(rect); + if (!LLGLSLShader::sNoFixedFunction) + { //polygon stipple is deprecated + glPolygonStipple( checkerboard ); + + LLGLEnable polygon_stipple(GL_POLYGON_STIPPLE); + gl_rect_2d(rect); + } + else + { + gl_rect_2d(rect); + } gGL.flush(); } -- cgit v1.2.3 From f49e7014ca9693d77ff265d3fc668a8b05ddf085 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Sat, 24 Sep 2011 23:29:38 -0500 Subject: SH-2244 Fix for crash when transparent water disabled (silently ignore setting when basic shaders enabled) --- indra/llui/llui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 212672b809..36f87fc597 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -534,7 +534,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex } } - gGL.getTexUnit(0)->bind(image); + gGL.getTexUnit(0)->bind(image, true); gGL.color4fv(color.mV); @@ -732,7 +732,7 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre LLGLSUIDefault gls_ui; - gGL.getTexUnit(0)->bind(image); + gGL.getTexUnit(0)->bind(image, true); gGL.color4fv(color.mV); @@ -785,7 +785,7 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre LLMatrix3 quat(0.f, 0.f, degrees*DEG_TO_RAD); - gGL.getTexUnit(0)->bind(image); + gGL.getTexUnit(0)->bind(image, true); gGL.color4fv(color.mV); -- cgit v1.2.3 From f657f5a428e47fc9963cc4eb943062216443673f Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 28 Sep 2011 15:54:02 -0500 Subject: SH-2276 Remove some log spam to alleviate stalls on login. --- indra/llui/llnotifications.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index ffe5908a9d..3fa13d7bb0 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1640,7 +1640,7 @@ LLNotificationPtr LLNotifications::find(LLUUID uuid) LLNotificationSet::iterator it=mItems.find(target); if (it == mItems.end()) { - llwarns << "Tried to dereference uuid '" << uuid << "' as a notification key but didn't find it." << llendl; + LL_DEBUGS("Notifications") << "Tried to dereference uuid '" << uuid << "' as a notification key but didn't find it." << llendl; return LLNotificationPtr((LLNotification*)NULL); } else -- cgit v1.2.3 From 8a8e9ccdb67e7e8a492a4fe1505407ebe128ee18 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 4 Nov 2011 16:15:05 -0500 Subject: SH-2652 Don't allocate 6000+ strings every frame --- indra/llui/lltextbase.cpp | 6 +++++- indra/llui/lltextbase.h | 2 +- indra/llui/llview.cpp | 6 ++++-- indra/llui/llview.h | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 919364be63..3b768166f1 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2518,7 +2518,11 @@ BOOL LLTextSegment::handleDoubleClick(S32 x, S32 y, MASK mask) { return FALSE; } BOOL LLTextSegment::handleHover(S32 x, S32 y, MASK mask) { return FALSE; } BOOL LLTextSegment::handleScrollWheel(S32 x, S32 y, S32 clicks) { return FALSE; } BOOL LLTextSegment::handleToolTip(S32 x, S32 y, MASK mask) { return FALSE; } -std::string LLTextSegment::getName() const { return ""; } +const std::string& LLTextSegment::getName() const +{ + static std::string empty_string(""); + return empty_string; +} void LLTextSegment::onMouseCaptureLost() {} void LLTextSegment::screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const {} void LLTextSegment::localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const {} diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 384d9116fc..b699601908 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -84,7 +84,7 @@ public: /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask); - /*virtual*/ std::string getName() const; + /*virtual*/ const std::string& getName() const; /*virtual*/ void onMouseCaptureLost(); /*virtual*/ void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const; /*virtual*/ void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const; diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 1644f53978..486babb0ab 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -225,9 +225,11 @@ BOOL LLView::getUseBoundingRect() const } // virtual -std::string LLView::getName() const +const std::string& LLView::getName() const { - return mName.empty() ? std::string("(no name)") : mName; + static std::string no_name("(no name)"); + + return mName.empty() ? no_name : mName; } void LLView::sendChildToFront(LLView* child) diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 08828e55e6..ec7f8e385d 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -431,7 +431,7 @@ public: /*virtual*/ BOOL handleRightMouseUp(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask); - /*virtual*/ std::string getName() const; + /*virtual*/ const std::string& getName() const; /*virtual*/ void onMouseCaptureLost(); /*virtual*/ BOOL hasMouseCapture(); /*virtual*/ void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const; -- cgit v1.2.3 From 961ce1c4e785103b696a8ec76674aee4c91fe011 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 15 Nov 2011 12:24:31 -0600 Subject: SH-2591 WIP -- fix for UI disappearing, introduces some artifacts in rotation ring, committing to debug elsewhere --- indra/llui/llui.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index c6f7e28027..33bc247987 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -955,10 +955,12 @@ void gl_ring( F32 radius, F32 width, const LLColor4& center_color, const LLColor if( render_center ) { gGL.color4fv(center_color.mV); + gGL.diffuseColor4fv(center_color.mV); gl_deep_circle( radius, width, steps ); } else { + gGL.diffuseColor4fv(side_color.mV); gl_washer_2d(radius, radius - width, steps, side_color, side_color); gGL.translateUI(0.f, 0.f, width); gl_washer_2d(radius - width, radius, steps, side_color, side_color); -- cgit v1.2.3 From d71736f3d92f1a276d4aafcbf70c6a8597457220 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 15 Nov 2011 17:32:09 -0800 Subject: SH-1865 PROGRESS -- Disable the anti-aliasing control on hardware our code doesn't support for anti-aliasing --- indra/llui/llspinctrl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h index d197084e38..87814f838e 100644 --- a/indra/llui/llspinctrl.h +++ b/indra/llui/llspinctrl.h @@ -96,6 +96,9 @@ public: void onUpBtn(const LLSD& data); void onDownBtn(const LLSD& data); + + const LLColor4& getEnabledTextColor() const { return mTextEnabledColor.get(); } + const LLColor4& getDisabledTextColor() const { return mTextDisabledColor.get(); } private: void updateLabelColor(); -- cgit v1.2.3