summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llaccordionctrltab.cpp2
-rw-r--r--indra/llui/llnotifications.cpp2
-rw-r--r--indra/llui/llspinctrl.h3
-rw-r--r--indra/llui/lltextbase.cpp6
-rw-r--r--indra/llui/lltextbase.h2
-rw-r--r--indra/llui/llui.cpp32
-rw-r--r--indra/llui/llview.cpp8
-rw-r--r--indra/llui/llview.h2
8 files changed, 38 insertions, 19 deletions
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index 4b0b7c561d..7a5f9f9fd6 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/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 8f7025a9a6..d232e27ef2 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -1624,7 +1624,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
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();
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/llui.cpp b/indra/llui/llui.cpp
index 79ad99a770..33bc247987 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -153,11 +153,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();
}
@@ -537,7 +537,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);
@@ -735,7 +735,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);
@@ -788,7 +788,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);
@@ -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);
@@ -995,10 +997,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();
}
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 3fd7e48428..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)
@@ -1215,7 +1217,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);
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;