From 497e63bfb6e7e36f29b4f3e23e68424cf2cd165f Mon Sep 17 00:00:00 2001 From: Shyotl Date: Thu, 31 Mar 2011 21:53:23 -0500 Subject: [PATCH] Fixed scaling issues with non-power-of-two ui textures --- indra/llui/llui.cpp | 6 ++---- indra/llui/llui.h | 9 +++------ indra/newview/llappviewer.cpp | 5 ++--- indra/newview/llvoavatar.cpp | 1 + 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 22c46d608..e06314d17 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -75,7 +75,6 @@ LLHtmlHelp* LLUI::sHtmlHelp = NULL; BOOL LLUI::sShowXUINames = FALSE; std::stack LLScreenClipRect::sClipRectStack; BOOL LLUI::sQAMode = FALSE; -S32 LLUI::sDefaultIconPriority = 0; // // Functions @@ -1559,8 +1558,8 @@ void LLUI::initClass(LLControlGroup* config, LLImageProviderInterface* image_provider, LLUIAudioCallback audio_callback, const LLVector2* scale_factor, - const std::string& language, - const S32 default_icon_priority) + const std::string& language + ) { sConfigGroup = config; sIgnoresGroup = ignores; @@ -1578,7 +1577,6 @@ void LLUI::initClass(LLControlGroup* config, sGLScaleFactor = (scale_factor == NULL) ? LLVector2(1.f, 1.f) : *scale_factor; sWindow = NULL; // set later in startup LLFontGL::sShadowColor = colors->getColor("ColorDropShadow"); - sDefaultIconPriority = default_icon_priority; LLUI::sShowXUINames = LLUI::sConfigGroup->getBOOL("ShowXUINames"); LLUI::sConfigGroup->getControl("ShowXUINames")->getSignal()->connect(&handleShowXUINamesChanged); diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 7a71b2396..c7b7446a0 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -162,8 +162,7 @@ public: LLImageProviderInterface* image_provider, LLUIAudioCallback audio_callback = NULL, const LLVector2 *scale_factor = NULL, - const std::string& language = LLStringUtil::null, - const S32 default_icon_priority = 0); + const std::string& language = LLStringUtil::null); static void cleanupClass(); static void pushMatrix(); @@ -182,8 +181,8 @@ public: static void getCursorPositionLocal(const LLView* viewp, S32 *x, S32 *y); static void setScaleFactor(const LLVector2& scale_factor); static void setLineWidth(F32 width); - static LLPointer getUIImageByID(const LLUUID& image_id, S32 priority = LLUI::sDefaultIconPriority); - static LLPointer getUIImage(const std::string& name, S32 priority = LLUI::sDefaultIconPriority); + static LLPointer getUIImageByID(const LLUUID& image_id, S32 priority = 0); + static LLPointer getUIImage(const std::string& name, S32 priority = 0); static LLVector2 getWindowSize(); static void screenPointToGL(S32 screen_x, S32 screen_y, S32 *gl_x, S32 *gl_y); static void glPointToScreen(S32 gl_x, S32 gl_y, S32 *screen_x, S32 *screen_y); @@ -204,8 +203,6 @@ public: static BOOL sShowXUINames; static LLHtmlHelp* sHtmlHelp; - static S32 sDefaultIconPriority; - // *TODO: remove the following when QAR-369 settings clean-up work is in. // Also remove the call to this method which will then be obsolete. // Search for QAR-369 below to enable the proper accessing of this feature. -MG diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8db6ee434..8b1446097 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -654,9 +654,8 @@ bool LLAppViewer::init() &gColors, LLUIImageList::getInstance(), ui_audio_callback, - &LLUI::sGLScaleFactor, - std::string(), - LLViewerFetchedTexture::BOOST_ICON); + &LLUI::sGLScaleFactor + ); LLWeb::initClass(); // do this after LLUI LLTextEditor::setURLCallbacks(&LLWeb::loadURL, diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 937ac6bec..fdbfdd11f 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2935,6 +2935,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) LLJoint::sNumTouches = 0; /*// *NOTE: this is necessary for the floating name text above your head. + // NOTE NOTE: This doesn't seem to be needed any more? if (mDrawable && mDrawable.notNull()) { gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_SHADOW, TRUE);