diff options
author | Kent Quirk <q@lindenlab.com> | 2010-03-18 16:53:41 -0400 |
---|---|---|
committer | Kent Quirk <q@lindenlab.com> | 2010-03-18 16:53:41 -0400 |
commit | 63a0e89fb569216642bd9e023c503741feb9fec2 (patch) | |
tree | 07a79f2b75ab1c5ac6fb9900ea29aa748d1c26b6 /indra | |
parent | 3e2db3d3364e3bb146da9d94b25638bd9fd7de29 (diff) | |
parent | 615f2cb18e3ade418dbfeca738fad58a6022a9be (diff) |
merge from hotfix to viewer-2-0 and resolve conflicts
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llrender/llrender.cpp | 50 | ||||
-rw-r--r-- | indra/llui/llaccordionctrltab.cpp | 3 | ||||
-rw-r--r-- | indra/llui/llbutton.h | 1 | ||||
-rw-r--r-- | indra/llui/llfloater.cpp | 1 | ||||
-rw-r--r-- | indra/llui/llmenugl.cpp | 5 | ||||
-rw-r--r-- | indra/llui/llscrolllistctrl.cpp | 4 | ||||
-rw-r--r-- | indra/llui/lltextbase.cpp | 2 | ||||
-rw-r--r-- | indra/llui/llui.cpp | 2 | ||||
-rw-r--r-- | indra/llui/llview.cpp | 3 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 2 | ||||
-rw-r--r-- | indra/newview/llprogressview.cpp | 26 | ||||
-rw-r--r-- | indra/newview/llprogressview.h | 2 | ||||
-rw-r--r-- | indra/newview/llscrollingpanelparam.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/main_view.xml | 18 |
16 files changed, 104 insertions, 41 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 656f690db5..c3540a717c 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -121,6 +121,8 @@ void LLTexUnit::refreshState(void) // We set dirty to true so that the tex unit knows to ignore caching // and we reset the cached tex unit state + gGL.flush(); + glActiveTextureARB(GL_TEXTURE0_ARB + mIndex); if (mCurrTexType != TT_NONE) { @@ -150,6 +152,7 @@ void LLTexUnit::activate(void) if ((S32)gGL.mCurrTextureUnitIndex != mIndex || gGL.mDirty) { + gGL.flush(); glActiveTextureARB(GL_TEXTURE0_ARB + mIndex); gGL.mCurrTextureUnitIndex = mIndex; } @@ -181,6 +184,7 @@ void LLTexUnit::disable(void) { activate(); unbind(mCurrTexType); + gGL.flush(); glDisable(sGLTextureType[mCurrTexType]); mCurrTexType = TT_NONE; } @@ -386,6 +390,8 @@ void LLTexUnit::setTextureAddressMode(eTextureAddressMode mode) { if (mIndex < 0 || mCurrTexture == 0) return; + gGL.flush(); + activate(); glTexParameteri (sGLTextureType[mCurrTexType], GL_TEXTURE_WRAP_S, sGLAddressMode[mode]); @@ -400,6 +406,8 @@ void LLTexUnit::setTextureFilteringOption(LLTexUnit::eTextureFilterOptions optio { if (mIndex < 0 || mCurrTexture == 0) return; + gGL.flush(); + if (option == TFO_POINT) { glTexParameteri(sGLTextureType[mCurrTexType], GL_TEXTURE_MAG_FILTER, GL_NEAREST); @@ -567,6 +575,7 @@ void LLTexUnit::setTextureCombiner(eTextureBlendOp op, eTextureBlendSrc src1, eT if (mCurrBlendType != TB_COMBINE || gGL.mDirty) { mCurrBlendType = TB_COMBINE; + gGL.flush(); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); } @@ -577,6 +586,8 @@ void LLTexUnit::setTextureCombiner(eTextureBlendOp op, eTextureBlendSrc src1, eT return; } + gGL.flush(); + // Get the gl source enums according to the eTextureBlendSrc sources passed in GLint source1 = getTextureSource(src1); GLint source2 = getTextureSource(src2); @@ -709,6 +720,7 @@ void LLTexUnit::setColorScale(S32 scale) if (mCurrColorScale != scale || gGL.mDirty) { mCurrColorScale = scale; + gGL.flush(); glTexEnvi( GL_TEXTURE_ENV, GL_RGB_SCALE, scale ); } } @@ -718,6 +730,7 @@ void LLTexUnit::setAlphaScale(S32 scale) if (mCurrAlphaScale != scale || gGL.mDirty) { mCurrAlphaScale = scale; + gGL.flush(); glTexEnvi( GL_TEXTURE_ENV, GL_ALPHA_SCALE, scale ); } } @@ -853,7 +866,15 @@ void LLRender::scaleUI(F32 x, F32 y, F32 z) void LLRender::pushUIMatrix() { - mUIOffset.push_front(mUIOffset.front()); + if (mUIOffset.empty()) + { + mUIOffset.push_front(LLVector3(0,0,0)); + } + else + { + mUIOffset.push_front(mUIOffset.front()); + } + if (mUIScale.empty()) { mUIScale.push_front(LLVector3(1,1,1)); @@ -1105,6 +1126,33 @@ void LLRender::flush() sUICalls++; sUIVerts += mCount; } + + if (gDebugGL) + { + if (mMode == LLRender::QUADS) + { + if (mCount%4 != 0) + { + llerrs << "Incomplete quad rendered." << llendl; + } + } + + if (mMode == LLRender::TRIANGLES) + { + if (mCount%3 != 0) + { + llerrs << "Incomplete triangle rendered." << llendl; + } + } + + if (mMode == LLRender::LINES) + { + if (mCount%2 != 0) + { + llerrs << "Incomplete line rendered." << llendl; + } + } + } mBuffer->setBuffer(immediate_mask); mBuffer->drawArrays(mMode, 0, mCount); diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 1067c3f1d5..e12776f83a 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -826,9 +826,6 @@ void LLAccordionCtrlTab::draw() LLLocalClipRect clip(child_rect); drawChild(root_rect,mContainerPanel); } - - - gGL.getTexUnit(0)->disable(); } } diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 59b551a16d..6a0d8ef3d6 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -216,7 +216,6 @@ public: void setImageOverlay(const std::string& image_name, LLFontGL::HAlign alignment = LLFontGL::HCENTER, const LLColor4& color = LLColor4::white); void setImageOverlay(const LLUUID& image_id, LLFontGL::HAlign alignment = LLFontGL::HCENTER, const LLColor4& color = LLColor4::white); LLPointer<LLUIImage> getImageOverlay() { return mImageOverlay; } - LLFontGL::HAlign getImageOverlayHAlign() const { return mImageOverlayAlignment; } void autoResize(); // resize with label of current btn state void resize(LLUIString label); // resize with label input diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 4cb336f7ea..ab14c08948 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1354,7 +1354,6 @@ void LLFloater::bringToFront( S32 x, S32 y ) // virtual void LLFloater::setVisibleAndFrontmost(BOOL take_focus) { - LLUI::clearPopups(); setVisible(TRUE); setFrontmost(take_focus); } diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 0d56c5ed31..fb4a9d032d 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3455,7 +3455,7 @@ LLView* const LLMenuHolderGL::getVisibleMenu() const for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) { LLView* viewp = *child_it; - if (viewp->getVisible() && dynamic_cast<LLMenuBarGL*>(viewp) == NULL) + if (viewp->getVisible() && dynamic_cast<LLMenuGL*>(viewp) != NULL) { return viewp; } @@ -3478,8 +3478,7 @@ BOOL LLMenuHolderGL::hideMenus() for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) { LLView* viewp = *child_it; - // clicks off of menu do not hide menu bar - if (dynamic_cast<LLMenuBarGL*>(viewp) == NULL && viewp->getVisible()) + if (dynamic_cast<LLMenuGL*>(viewp) != NULL && viewp->getVisible()) { viewp->setVisible(FALSE); } diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 18ec5b51dd..77caaaa425 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -630,9 +630,7 @@ void LLScrollListCtrl::calcColumnWidths() LLScrollListCell* cellp = (*iter)->getColumn(column->mIndex); if (!cellp) continue; - // get text value width only for text cells - column->mMaxContentWidth = cellp->isText() ? - llmax(LLFontGL::getFontSansSerifSmall()->getWidth(cellp->getValue().asString()) + mColumnPadding + COLUMN_TEXT_PADDING, column->mMaxContentWidth) : column->mMaxContentWidth; + column->mMaxContentWidth = llmax(LLFontGL::getFontSansSerifSmall()->getWidth(cellp->getValue().asString()) + mColumnPadding + COLUMN_TEXT_PADDING, column->mMaxContentWidth); } max_item_width += column->mMaxContentWidth; diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 851fb966ec..633135382e 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -246,7 +246,7 @@ LLTextBase::~LLTextBase() { // Menu, like any other LLUICtrl, is deleted by its parent - gMenuHolder - clearSegments(); + mSegments.clear(); } void LLTextBase::initFromParams(const LLTextBase::Params& p) diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 5121ef5351..b049895526 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -207,7 +207,7 @@ void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled ) // Counterclockwise quad will face the viewer if( filled ) - { + { gGL.begin( LLRender::QUADS ); gGL.vertex2i(left, top); gGL.vertex2i(left, bottom); diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 57beb71a01..781c111474 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -1325,7 +1325,6 @@ void LLView::drawChildren() localRectToScreen(viewp->getRect(),&screenRect); if ( rootRect.overlaps(screenRect) && LLUI::sDirtyRect.overlaps(screenRect)) { - glMatrixMode(GL_MODELVIEW); LLUI::pushMatrix(); { LLUI::translate((F32)viewp->getRect().mLeft, (F32)viewp->getRect().mBottom, 0.f); @@ -1349,8 +1348,6 @@ void LLView::drawChildren() } --sDepth; } - - gGL.getTexUnit(0)->disable(); } void LLView::dirtyRect() diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8edf766132..74037f8b21 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10347,7 +10347,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>VivoxDebugLevel</key> <map> diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 120b584cd9..9b5e38d0aa 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -68,15 +68,16 @@ const F32 TOTAL_LOGIN_TIME = 10.f; // seconds, wild guess at time from GL contex S32 gLastStartAnimationFrame = 0; // human-style indexing, first image = 1 const S32 ANIMATION_FRAMES = 1; //13; +static LLRegisterPanelClassWrapper<LLProgressView> r("progress_view"); + + // XUI: Translate -LLProgressView::LLProgressView(const LLRect &rect) +LLProgressView::LLProgressView() : LLPanel(), mPercentDone( 0.f ), mMouseDownInActiveArea( false ), mUpdateEvents("LLProgressView") { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_progress.xml"); - reshape(rect.getWidth(), rect.getHeight()); mUpdateEvents.listen("self", boost::bind(&LLProgressView::handleUpdate, this, _1)); } @@ -92,6 +93,9 @@ BOOL LLProgressView::postBuild() getChild<LLTextBox>("message_text")->setClickedCallback(onClickMessage, this); + // hidden initially, until we need it + LLPanel::setVisible(FALSE); + sInstance = this; return TRUE; } @@ -126,19 +130,23 @@ BOOL LLProgressView::handleKeyHere(KEY key, MASK mask) void LLProgressView::setVisible(BOOL visible) { + // hiding progress view if (getVisible() && !visible) { - mFadeTimer.start(); + // hiding progress view, so show menu bars + LLUI::getRootView()->getChildView("menu_bar_holder")->setVisible(TRUE); } + // showing progress view else if (!getVisible() && visible) { - gViewerWindow->addPopup(this); - + // showing progress view, so hide menu bars + LLUI::getRootView()->getChildView("menu_bar_holder")->setVisible(FALSE); + setFocus(TRUE); mFadeTimer.stop(); mProgressTimer.start(); - LLPanel::setVisible(visible); + LLPanel::setVisible(TRUE); } } @@ -148,7 +156,7 @@ void LLProgressView::draw() static LLTimer timer; // Paint bitmap if we've got one - glPushMatrix(); + glPushMatrix(); if (gStartTexture) { LLGLSUIDefault gls_ui; @@ -189,7 +197,7 @@ void LLProgressView::draw() // Fade is complete, release focus gFocusMgr.releaseFocusIfNeeded( this ); LLPanel::setVisible(FALSE); - gViewerWindow->removePopup(this); + mFadeTimer.stop(); gStartTexture = NULL; } diff --git a/indra/newview/llprogressview.h b/indra/newview/llprogressview.h index 6853674d88..374b14be83 100644 --- a/indra/newview/llprogressview.h +++ b/indra/newview/llprogressview.h @@ -44,7 +44,7 @@ class LLProgressBar; class LLProgressView : public LLPanel { public: - LLProgressView(const LLRect& rect); + LLProgressView(); virtual ~LLProgressView(); BOOL postBuild(); diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp index 32a915608e..dc64296521 100644 --- a/indra/newview/llscrollingpanelparam.cpp +++ b/indra/newview/llscrollingpanelparam.cpp @@ -168,25 +168,25 @@ void LLScrollingPanelParam::draw() LLPanel::draw(); // Draw the hints over the "less" and "more" buttons. - glPushMatrix(); + gGL.pushUIMatrix(); { const LLRect& r = mHintMin->getRect(); F32 left = (F32)(r.mLeft + BTN_BORDER); F32 bot = (F32)(r.mBottom + BTN_BORDER); - glTranslatef(left, bot, 0.f); + gGL.translateUI(left, bot, 0.f); mHintMin->draw(); } - glPopMatrix(); + gGL.popUIMatrix(); - glPushMatrix(); + gGL.pushUIMatrix(); { const LLRect& r = mHintMax->getRect(); F32 left = (F32)(r.mLeft + BTN_BORDER); F32 bot = (F32)(r.mBottom + BTN_BORDER); - glTranslatef(left, bot, 0.f); + gGL.translateUI(left, bot, 0.f); mHintMax->draw(); } - glPopMatrix(); + gGL.popUIMatrix(); // Draw labels on top of the buttons diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 5c40d02f8d..d546d2b16b 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -436,7 +436,8 @@ void init_menus() gMenuBarView->setRect(LLRect(0, top, 0, top - MENU_BAR_HEIGHT)); gMenuBarView->setBackgroundColor( color ); - gMenuHolder->addChild(gMenuBarView); + LLView* menu_bar_holder = gViewerWindow->getRootView()->getChildView("menu_bar_holder"); + menu_bar_holder->addChild(gMenuBarView); gViewerWindow->setMenuBackgroundColor(false, LLViewerLogin::getInstance()->isInProductionGrid()); @@ -471,9 +472,10 @@ void init_menus() gLoginMenuBarView = LLUICtrlFactory::getInstance()->createFromFile<LLMenuBarGL>("menu_login.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); gLoginMenuBarView->arrangeAndClear(); LLRect menuBarRect = gLoginMenuBarView->getRect(); - gLoginMenuBarView->setRect(LLRect(menuBarRect.mLeft, menuBarRect.mTop, gViewerWindow->getRootView()->getRect().getWidth() - menuBarRect.mLeft, menuBarRect.mBottom)); + menuBarRect.setLeftTopAndSize(0, menu_bar_holder->getRect().getHeight(), menuBarRect.getWidth(), menuBarRect.getHeight()); + gLoginMenuBarView->setRect(menuBarRect); gLoginMenuBarView->setBackgroundColor( color ); - gMenuHolder->addChild(gLoginMenuBarView); + menu_bar_holder->addChild(gLoginMenuBarView); // tooltips are on top of EVERYTHING, including menus gViewerWindow->getRootView()->sendChildToFront(gToolTipView); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index adac4b9b40..e7d64c48a0 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1351,7 +1351,8 @@ LLViewerWindow::LLViewerWindow( mStatesDirty(false), mIsFullscreenChecked(false), mCurrResolutionIndex(0), - mViewerWindowListener(new LLViewerWindowListener(this)) + mViewerWindowListener(new LLViewerWindowListener(this)), + mProgressView(NULL) { LLNotificationChannel::buildChannel("VW_alerts", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alert")); LLNotificationChannel::buildChannel("VW_alertmodal", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alertmodal")); @@ -1588,8 +1589,7 @@ void LLViewerWindow::initBase() gToolTipView = getRootView()->getChild<LLToolTipView>("tooltip view"); // Add the progress bar view (startup view), which overrides everything - mProgressView = new LLProgressView(full_window); - getRootView()->addChild(mProgressView); + mProgressView = getRootView()->getChild<LLProgressView>("progress_view"); setShowProgress(FALSE); setProgressCancelButtonVisible(FALSE); diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index 85853f39bb..1ace760816 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -143,12 +143,19 @@ <panel mouse_opaque="false" follows="left|right|top" name="status_bar_container" - tab_stop="false" + tab_stop="false" height="19" left="0" top="0" width="1024" visible="false"/> + <view mouse_opaque="false" + follows="all" + name="menu_bar_holder" + left="0" + top="0" + width="1024" + height="768"/> <notify_box_view top="0" follows="all" height="768" @@ -159,6 +166,15 @@ <panel top="0" follows="all" height="768" + mouse_opaque="true" + name="progress_view" + filename="panel_progress.xml" + class="progress_view" + width="1024" + visible="false"/> + <panel top="0" + follows="all" + height="768" mouse_opaque="false" name="popup_holder" class="popup_holder" |