diff options
author | leyla_linden <none@none> | 2011-02-14 16:32:36 -0800 |
---|---|---|
committer | leyla_linden <none@none> | 2011-02-14 16:32:36 -0800 |
commit | 9fcc8c3161986a7eb8052aaf353a2a4d2e6974f5 (patch) | |
tree | 2a4d6b8fe1f7255323e84d269575fe34bec39df2 /indra/newview | |
parent | a44b1ff511cb8f3399aa318ac15019ad97938c45 (diff) | |
parent | 547293305bdc6c345f52519db514bb5be34c72ef (diff) |
Merge
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llagentpilot.cpp | 6 | ||||
-rwxr-xr-x | indra/newview/llappviewer.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llnamelistctrl.cpp | 24 | ||||
-rw-r--r-- | indra/newview/llselectmgr.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llviewermedia.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 10 | ||||
-rwxr-xr-x | indra/newview/pipeline.cpp | 28 |
7 files changed, 63 insertions, 34 deletions
diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp index f96db0a5df..734c502fcf 100755 --- a/indra/newview/llagentpilot.cpp +++ b/indra/newview/llagentpilot.cpp @@ -35,7 +35,6 @@ #include "llappviewer.h" #include "llviewercontrol.h" #include "llviewercamera.h" -#include "llviewerjoystick.h" #include "llsdserialize.h" #include "llsdutil_math.h" @@ -259,11 +258,6 @@ void LLAgentPilot::startPlayback() if (mActions.count()) { llinfos << "Starting playback, moving to waypoint 0" << llendl; - if (getOverrideCamera() && - !LLViewerJoystick::getInstance()->getOverrideCamera()) - { - LLViewerJoystick::getInstance()->toggleFlycam(); - } gAgent.startAutoPilotGlobal(mActions[0].mTarget); moveCamera(); mStarted = FALSE; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0118d2dfc1..add0e72ce2 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4220,16 +4220,13 @@ void LLAppViewer::idle() LLWorld::getInstance()->updateParticles(); } - if (LLViewerJoystick::getInstance()->getOverrideCamera()) + if (gAgentPilot.isPlaying() && gAgentPilot.getOverrideCamera()) + { + gAgentPilot.moveCamera(); + } + else if (LLViewerJoystick::getInstance()->getOverrideCamera()) { - if (gAgentPilot.isPlaying() && gAgentPilot.getOverrideCamera()) - { - gAgentPilot.moveCamera(); - } - else - { - LLViewerJoystick::getInstance()->moveFlycam(); - } + LLViewerJoystick::getInstance()->moveFlycam(); } else { diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 38100aa6c5..afceb58ccf 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -143,6 +143,30 @@ void LLNameListCtrl::mouseOverHighlightNthItem( S32 target_index ) S32 cur_index = getHighlightedItemInx(); if (cur_index != target_index) { + bool is_mouse_over_name_cell = false; + + S32 mouse_x, mouse_y; + LLUI::getMousePositionLocal(this, &mouse_x, &mouse_y); + + S32 column_index = getColumnIndexFromOffset(mouse_x); + LLScrollListItem* hit_item = hitItem(mouse_x, mouse_y); + if (hit_item && column_index == mNameColumnIndex) + { + // Get the name cell which is currently under the mouse pointer. + LLScrollListCell* hit_cell = hit_item->getColumn(column_index); + if (hit_cell) + { + is_mouse_over_name_cell = getCellRect(cur_index, column_index).pointInRect(mouse_x, mouse_y); + } + } + + // If the tool tip is visible and the mouse is over the currently highlighted item's name cell, + // we should not reset the highlighted item index i.e. set mHighlightedItem = -1 + // and should not increase the width of the text inside the cell because it may + // overlap the tool tip icon. + if (LLToolTipMgr::getInstance()->toolTipVisible() && is_mouse_over_name_cell) + return; + if(0 <= cur_index && cur_index < (S32)getItemList().size()) { LLScrollListItem* item = getItemList()[cur_index]; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 746ba274ed..93c9131424 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5492,7 +5492,12 @@ void LLSelectNode::renderOneWireframe(const LLColor4& color) BOOL is_hud_object = objectp->isHUDAttachment(); - if (!is_hud_object) + if (drawable->isActive()) + { + glLoadMatrixd(gGLModelView); + glMultMatrixf((F32*) objectp->getRenderMatrix().mMatrix); + } + else if (!is_hud_object) { glLoadIdentity(); glMultMatrixd(gGLModelView); @@ -5500,11 +5505,6 @@ void LLSelectNode::renderOneWireframe(const LLColor4& color) glTranslatef(trans.mV[0], trans.mV[1], trans.mV[2]); } - if (drawable->isActive()) - { - glMultMatrixf((F32*) objectp->getRenderMatrix().mMatrix); - } - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); if (LLSelectMgr::sRenderHiddenSelections) // && gFloaterTools && gFloaterTools->getVisible()) diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index fcd9141269..a8d5c9776c 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -53,7 +53,7 @@ #include "llwebsharing.h" // For LLWebSharing::setOpenIDCookie(), *TODO: find a better way to do this! #include "llfilepicker.h" #include "llnotifications.h" -#include "lldir_win32.h" +#include "lldir.h" #include "llevent.h" // LLSimpleListener #include "llnotificationsutil.h" #include "lluuid.h" diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index a257703b24..0771e72bdc 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3335,13 +3335,21 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) if (visible && !isSelf() && !mIsDummy && sUseImpostors && !mNeedsAnimUpdate && !sFreezeCounter) { + const LLVector4a* ext = mDrawable->getSpatialExtents(); + LLVector4a size; + size.setSub(ext[1],ext[0]); + F32 mag = size.getLength3().getF32()*0.5f; + F32 impostor_area = 256.f*512.f*(8.125f - LLVOAvatar::sLODFactor*8.f); if (LLMuteList::getInstance()->isMuted(getID())) { // muted avatars update at 16 hz mUpdatePeriod = 16; } - else if (mVisibilityRank <= LLVOAvatar::sMaxVisible) + else if (mVisibilityRank <= LLVOAvatar::sMaxVisible || + mDrawable->mDistanceWRTCamera < 1.f + mag) { //first 25% of max visible avatars are not impostored + //also, don't impostor avatars whose bounding box may be penetrating the + //impostor camera near clip plane mUpdatePeriod = 1; } else if (mVisibilityRank > LLVOAvatar::sMaxVisible * 4) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 69173d26f4..b0aa50bc57 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -9352,10 +9352,10 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) glMatrixMode(GL_PROJECTION); glPushMatrix(); - //glh::matrix4f ortho = gl_ortho(-tdim.mV[0], tdim.mV[0], -tdim.mV[1], tdim.mV[1], 1.0, 256.0); + F32 distance = (pos-camera.getOrigin()).length(); F32 fov = atanf(tdim.mV[1]/distance)*2.f*RAD_TO_DEG; - F32 aspect = tdim.mV[0]/tdim.mV[1]; //128.f/256.f; + F32 aspect = tdim.mV[0]/tdim.mV[1]; glh::matrix4f persp = gl_perspective(fov, aspect, 1.f, 256.f); glh_set_current_projection(persp); glLoadMatrixf(persp.m); @@ -9374,7 +9374,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) gGL.setColorMask(true, true); glStencilMask(0xFFFFFFFF); glClearStencil(0); - + // get the number of pixels per angle F32 pa = gViewerWindow->getWindowHeightRaw() / (RAD_TO_DEG * viewer_camera->getView()); @@ -9424,9 +9424,6 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) glStencilFunc(GL_EQUAL, 1, 0xFFFFFF); { //create alpha mask based on stencil buffer (grey out if muted) - LLVector3 left = camera.getLeftAxis()*tdim.mV[0]*2.f; - LLVector3 up = camera.getUpAxis()*tdim.mV[1]*2.f; - if (LLPipeline::sRenderDeferred) { GLuint buff = GL_COLOR_ATTACHMENT0_EXT; @@ -9449,16 +9446,25 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) LLGLDepthTest depth(GL_FALSE, GL_FALSE); - gGL.color4f(1,1,1,1); + gGL.flush(); + + glPushMatrix(); + glLoadIdentity(); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gGL.color4ub(64,64,64,255); gGL.begin(LLRender::QUADS); - gGL.vertex3fv((pos+left-up).mV); - gGL.vertex3fv((pos-left-up).mV); - gGL.vertex3fv((pos-left+up).mV); - gGL.vertex3fv((pos+left+up).mV); + gGL.vertex2f(-1, -1); + gGL.vertex2f(1, -1); + gGL.vertex2f(1, 1); + gGL.vertex2f(-1, 1); gGL.end(); gGL.flush(); + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); gGL.setSceneBlendType(LLRender::BT_ALPHA); } |