Fixed scaling issues with non-power-of-two ui textures

This commit is contained in:
Shyotl
2011-03-31 21:53:23 -05:00
parent e756140e1d
commit 497e63bfb6
4 changed files with 8 additions and 13 deletions

View File

@@ -75,7 +75,6 @@ LLHtmlHelp* LLUI::sHtmlHelp = NULL;
BOOL LLUI::sShowXUINames = FALSE; BOOL LLUI::sShowXUINames = FALSE;
std::stack<LLRect> LLScreenClipRect::sClipRectStack; std::stack<LLRect> LLScreenClipRect::sClipRectStack;
BOOL LLUI::sQAMode = FALSE; BOOL LLUI::sQAMode = FALSE;
S32 LLUI::sDefaultIconPriority = 0;
// //
// Functions // Functions
@@ -1559,8 +1558,8 @@ void LLUI::initClass(LLControlGroup* config,
LLImageProviderInterface* image_provider, LLImageProviderInterface* image_provider,
LLUIAudioCallback audio_callback, LLUIAudioCallback audio_callback,
const LLVector2* scale_factor, const LLVector2* scale_factor,
const std::string& language, const std::string& language
const S32 default_icon_priority) )
{ {
sConfigGroup = config; sConfigGroup = config;
sIgnoresGroup = ignores; sIgnoresGroup = ignores;
@@ -1578,7 +1577,6 @@ void LLUI::initClass(LLControlGroup* config,
sGLScaleFactor = (scale_factor == NULL) ? LLVector2(1.f, 1.f) : *scale_factor; sGLScaleFactor = (scale_factor == NULL) ? LLVector2(1.f, 1.f) : *scale_factor;
sWindow = NULL; // set later in startup sWindow = NULL; // set later in startup
LLFontGL::sShadowColor = colors->getColor("ColorDropShadow"); LLFontGL::sShadowColor = colors->getColor("ColorDropShadow");
sDefaultIconPriority = default_icon_priority;
LLUI::sShowXUINames = LLUI::sConfigGroup->getBOOL("ShowXUINames"); LLUI::sShowXUINames = LLUI::sConfigGroup->getBOOL("ShowXUINames");
LLUI::sConfigGroup->getControl("ShowXUINames")->getSignal()->connect(&handleShowXUINamesChanged); LLUI::sConfigGroup->getControl("ShowXUINames")->getSignal()->connect(&handleShowXUINamesChanged);

View File

@@ -162,8 +162,7 @@ public:
LLImageProviderInterface* image_provider, LLImageProviderInterface* image_provider,
LLUIAudioCallback audio_callback = NULL, LLUIAudioCallback audio_callback = NULL,
const LLVector2 *scale_factor = NULL, const LLVector2 *scale_factor = NULL,
const std::string& language = LLStringUtil::null, const std::string& language = LLStringUtil::null);
const S32 default_icon_priority = 0);
static void cleanupClass(); static void cleanupClass();
static void pushMatrix(); static void pushMatrix();
@@ -182,8 +181,8 @@ public:
static void getCursorPositionLocal(const LLView* viewp, S32 *x, S32 *y); static void getCursorPositionLocal(const LLView* viewp, S32 *x, S32 *y);
static void setScaleFactor(const LLVector2& scale_factor); static void setScaleFactor(const LLVector2& scale_factor);
static void setLineWidth(F32 width); static void setLineWidth(F32 width);
static LLPointer<LLUIImage> getUIImageByID(const LLUUID& image_id, S32 priority = LLUI::sDefaultIconPriority); static LLPointer<LLUIImage> getUIImageByID(const LLUUID& image_id, S32 priority = 0);
static LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority = LLUI::sDefaultIconPriority); static LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority = 0);
static LLVector2 getWindowSize(); static LLVector2 getWindowSize();
static void screenPointToGL(S32 screen_x, S32 screen_y, S32 *gl_x, S32 *gl_y); 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); static void glPointToScreen(S32 gl_x, S32 gl_y, S32 *screen_x, S32 *screen_y);
@@ -204,8 +203,6 @@ public:
static BOOL sShowXUINames; static BOOL sShowXUINames;
static LLHtmlHelp* sHtmlHelp; static LLHtmlHelp* sHtmlHelp;
static S32 sDefaultIconPriority;
// *TODO: remove the following when QAR-369 settings clean-up work is in. // *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. // 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 // Search for QAR-369 below to enable the proper accessing of this feature. -MG

View File

@@ -654,9 +654,8 @@ bool LLAppViewer::init()
&gColors, &gColors,
LLUIImageList::getInstance(), LLUIImageList::getInstance(),
ui_audio_callback, ui_audio_callback,
&LLUI::sGLScaleFactor, &LLUI::sGLScaleFactor
std::string(), );
LLViewerFetchedTexture::BOOST_ICON);
LLWeb::initClass(); // do this after LLUI LLWeb::initClass(); // do this after LLUI
LLTextEditor::setURLCallbacks(&LLWeb::loadURL, LLTextEditor::setURLCallbacks(&LLWeb::loadURL,

View File

@@ -2935,6 +2935,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
LLJoint::sNumTouches = 0; LLJoint::sNumTouches = 0;
/*// *NOTE: this is necessary for the floating name text above your head. /*// *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()) if (mDrawable && mDrawable.notNull())
{ {
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_SHADOW, TRUE); gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_SHADOW, TRUE);