diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-07-25 18:20:17 +0300 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-07-25 18:20:17 +0300 |
commit | adeee613c60e8d4d2d57ede9685b8388a681c409 (patch) | |
tree | 293356b6048b0c3f43b7570329e11a4c308e25ca /indra/llui | |
parent | 17fae30f721c716bab1dd78cc5f8ac6b0aad49e0 (diff) |
DRTVWR-493 LLRender2D to LLParamSingleton
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llui.cpp | 7 | ||||
-rw-r--r-- | indra/llui/llui.h | 20 |
2 files changed, 11 insertions, 16 deletions
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index e9f8ba020e..2e2833c197 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -164,7 +164,7 @@ void LLUI::initClass(const settings_map_t& settings, const LLVector2* scale_factor, const std::string& language) { - LLRender2D::initClass(image_provider,scale_factor); + LLRender2D::initParamSingleton(image_provider,scale_factor); sSettingGroups = settings; if ((get_ptr_in_map(sSettingGroups, std::string("config")) == NULL) || @@ -207,11 +207,6 @@ void LLUI::initClass(const settings_map_t& settings, LLCommandManager::load(); } -void LLUI::cleanupClass() -{ - SUBSYSTEM_CLEANUP(LLRender2D); -} - void LLUI::setPopupFuncs(const add_popup_t& add_popup, const remove_popup_t& remove_popup, const clear_popups_t& clear_popups) { sAddPopupFunc = add_popup; diff --git a/indra/llui/llui.h b/indra/llui/llui.h index d7151dbee9..c6ee11a96e 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -243,13 +243,13 @@ public: LLUIAudioCallback deferred_audio_callback = NULL, const LLVector2 *scale_factor = NULL, const std::string& language = LLStringUtil::null); - static void cleanupClass(); + static void setPopupFuncs(const add_popup_t& add_popup, const remove_popup_t&, const clear_popups_t& ); - static void pushMatrix() { LLRender2D::pushMatrix(); } - static void popMatrix() { LLRender2D::popMatrix(); } - static void loadIdentity() { LLRender2D::loadIdentity(); } - static void translate(F32 x, F32 y, F32 z = 0.0f) { LLRender2D::translate(x, y, z); } + static void pushMatrix() { LLRender2D::getInstance()->pushMatrix(); } + static void popMatrix() { LLRender2D::getInstance()->popMatrix(); } + static void loadIdentity() { LLRender2D::getInstance()->loadIdentity(); } + static void translate(F32 x, F32 y, F32 z = 0.0f) { LLRender2D::getInstance()->translate(x, y, z); } static LLRect sDirtyRect; static BOOL sDirty; @@ -294,13 +294,13 @@ public: static void getMousePositionScreen(S32 *x, S32 *y); static void setMousePositionLocal(const LLView* viewp, S32 x, S32 y); static void getMousePositionLocal(const LLView* viewp, S32 *x, S32 *y); - static LLVector2& getScaleFactor() { return LLRender2D::sGLScaleFactor; } - static void setScaleFactor(const LLVector2& scale_factor) { LLRender2D::setScaleFactor(scale_factor); } - static void setLineWidth(F32 width) { LLRender2D::setLineWidth(width); } + static LLVector2& getScaleFactor() { return LLRender2D::getInstance()->mGLScaleFactor; } + static void setScaleFactor(const LLVector2& scale_factor) { LLRender2D::getInstance()->setScaleFactor(scale_factor); } + static void setLineWidth(F32 width) { LLRender2D::getInstance()->setLineWidth(width); } static LLPointer<LLUIImage> getUIImageByID(const LLUUID& image_id, S32 priority = 0) - { return LLRender2D::getUIImageByID(image_id, priority); } + { return LLRender2D::getInstance()->getUIImageByID(image_id, priority); } static LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority = 0) - { return LLRender2D::getUIImage(name, priority); } + { return LLRender2D::getInstance()->getUIImage(name, priority); } 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); |