diff options
Diffstat (limited to 'indra/newview')
54 files changed, 520 insertions, 731 deletions
| diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index eb04b430d7..e185d96c98 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5797,17 +5797,6 @@        <key>Value</key>        <integer>1</integer>      </map> -    <key>RenderDynamicReflections</key> -    <map> -      <key>Comment</key> -      <string>Generate a dynamic cube map for reflections (objects reflect their environment, experimental).</string> -      <key>Persist</key> -      <integer>1</integer> -      <key>Type</key> -      <string>Boolean</string> -      <key>Value</key> -      <integer>0</integer> -    </map>      <key>RenderFSAASamples</key>      <map>        <key>Comment</key> @@ -9961,11 +9950,11 @@        <key>Comment</key>        <string>Controls whether the thread watchdog timer is activated.</string>        <key>Persist</key> -      <integer>1</integer> +      <integer>0</integer>        <key>Type</key>        <string>Boolean</string>        <key>Value</key> -      <integer>1</integer> +      <integer>0</integer>      </map>      <key>WaterEditPresets</key>      <map> diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt index f0b0f0c514..f038e0f64d 100644 --- a/indra/newview/gpu_table.txt +++ b/indra/newview/gpu_table.txt @@ -186,6 +186,7 @@ NVIDIA GeForce Go 6700			.*NVIDIA.*GeForce Go 67.*			1		1  NVIDIA GeForce Go 6800			.*NVIDIA.*GeForce Go 68.*			1		1  NVIDIA GeForce Go 7200			.*NVIDIA.*GeForce Go 72.*			1		1  NVIDIA GeForce Go 7300			.*NVIDIA.*GeForce Go 73.*			1		1 +NVIDIA GeForce Go 7300 LE		.*NVIDIA.*GeForce Go 73.*LE.*		0		1  NVIDIA GeForce Go 7400			.*NVIDIA.*GeForce Go 74.*			1		1  NVIDIA GeForce Go 7600			.*NVIDIA.*GeForce Go 76.*			2		1  NVIDIA GeForce Go 7700			.*NVIDIA.*GeForce Go 77.*			2		1 @@ -194,6 +195,7 @@ NVIDIA GeForce Go 7900			.*NVIDIA.*GeForce Go 79.*			2		1  NVIDIA GeForce Go 6				.*GeForce Go 6.*					1		1  NVIDIA GeForce PCX				.*GeForce PCX.*						0		1  NVIDIA Generic					.*NVIDIA.*Unknown.*					0		0 +NVIDIA NV34						.*NVIDIA.*NV34.*					0		1  NVIDIA NV43						.*NVIDIA.*NV43.*					1		1  NVIDIA MCP78					.*NVIDIA.*MCP78.*					1		1  NVIDIA Quadro2					.*Quadro2.*							0		1 diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 9d2ea7a1b7..e926e97f76 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -94,6 +94,7 @@  #include "llsky.h"  #include "llrendersphere.h"  #include "llstatusbar.h" +#include "llstartup.h"  #include "llimview.h"  #include "lltool.h"  #include "lltoolfocus.h" @@ -6432,7 +6433,6 @@ BOOL LLAgent::isWearingItem( const LLUUID& item_id )  	return (getWearableFromWearableItem( item_id ) != NULL);  } -  // static  void LLAgent::processAgentInitialWearablesUpdate( LLMessageSystem* mesgsys, void** user_data )  { @@ -6471,8 +6471,12 @@ void LLAgent::processAgentInitialWearablesUpdate( LLMessageSystem* mesgsys, void  			//avatar->createStandardWearables();  			// no, deal with it by noting that we need to choose a -			// gender. -			gAgent.setGenderChosen(FALSE); +			// gender, but only if an initial outfit load isn't happening. +			// This whole check (num_wearables < 4) can probably be deleted. JC +			if (gInitialOutfit.empty()) +			{ +				gAgent.setGenderChosen(FALSE); +			}  			return;  		} diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0c7a5e23ae..c040dae469 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -402,13 +402,13 @@ bool handleCrashSubmitBehaviorChanged(const LLSD& newvalue)  	const S32 NEVER_SUBMIT_REPORT = 2;  	if(cb == NEVER_SUBMIT_REPORT)  	{ -// 		LLWatchdog::getInstance()->cleanup(); // SJB: cleaning up a running watchdog is unsafe +// 		LLWatchdog::getInstance()->cleanup(); // SJB: cleaning up a running watchdog thread is unsafe  		LLAppViewer::instance()->destroyMainloopTimeout();  	}  	else if(gSavedSettings.getBOOL("WatchdogEnabled") == TRUE)  	{ -// 		LLWatchdog::getInstance()->init(); -// 		LLAppViewer::instance()->initMainloopTimeout("Mainloop Resume"); +		// Don't re-enable the watchdog when we change the setting; this may get called before it's started +// 		LLWatchdog::getInstance()->init();		  	}  	return true;  } @@ -530,7 +530,7 @@ void LLAppViewer::initGridChoice()  			std::string custom_server = gSavedSettings.getString("CustomServer");  			LLViewerLogin::getInstance()->setGridChoice(custom_server);  		} -		else if(server != 0) +		else if(server != (S32)GRID_INFO_NONE)  		{  			LLViewerLogin::getInstance()->setGridChoice((EGridInfo)server);  		} @@ -1139,12 +1139,12 @@ bool LLAppViewer::cleanup()  	llinfos << "Cleaning Up" << llendflush; -	LLKeyframeDataCache::clear(); -	  	// Must clean up texture references before viewer window is destroyed.  	LLHUDObject::cleanupHUDObjects();  	llinfos << "HUD Objects cleaned up" << llendflush; +	LLKeyframeDataCache::clear(); +	   	// End TransferManager before deleting systems it depends on (Audio, VFS, AssetStorage)  #if 0 // this seems to get us stuck in an infinite loop...  	gTransferManager.cleanup(); @@ -1321,7 +1321,7 @@ bool LLAppViewer::cleanup()  	removeMarkerFile(); // Any crashes from here on we'll just have to ignore -	closeDebug(); +	writeDebugInfo();  	// Let threads finish  	LLTimer idleTimer; @@ -1579,6 +1579,7 @@ bool LLAppViewer::initConfiguration()  	// on these platform to help debug.  #ifndef	LL_RELEASE_FOR_DOWNLOAD  	gSavedSettings.setBOOL("WatchdogEnabled", FALSE); +	gSavedSettings.setBOOL("QAMode", TRUE );  #endif  #ifndef LL_WINDOWS @@ -1630,15 +1631,6 @@ bool LLAppViewer::initConfiguration()  	// Do this *before* loading the settings file  	LLAlertDialog::parseAlerts("alerts.xml", &gSavedSettings, TRUE); -#if LL_DYNAMIC_FONT_DISCOVERY -	// Linux does *dynamic* font discovery which is preferable to -	// whatever got written-out into the config file last time.  This -	// does remove the ability of the user to hand-define the fallbacks -	// though, so from a config-management point of view this is hacky. -	gSavedSettings.setString("FontSansSerifFallback", -				 LLWindow::getFontListSans()); -#endif -  	// - read command line settings.  	LLControlGroupCLP clp;  	std::string	cmd_line_config	= gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, @@ -1683,6 +1675,15 @@ bool LLAppViewer::initConfiguration()  	// - load overrides from user_settings   	loadSettingsFromDirectory(LL_PATH_USER_SETTINGS); +#if LL_DYNAMIC_FONT_DISCOVERY +	// Linux does *dynamic* font discovery which is preferable to +	// whatever got written-out into the config file last time.  This +	// does remove the ability of the user to hand-define the fallbacks +	// though, so from a config-management point of view this is hacky. +	gSavedSettings.setString("FontSansSerifFallback", +				 LLWindow::getFontListSans()); +#endif +  	// - apply command line settings   	clp.notify();  @@ -2133,7 +2134,7 @@ bool LLAppViewer::initWindow()  	return true;  } -void LLAppViewer::closeDebug() +void LLAppViewer::writeDebugInfo()  {  	std::string debug_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"debug_info.log");  	llinfos << "Opening debug file " << debug_filename << llendl; @@ -2212,6 +2213,8 @@ void LLAppViewer::writeSystemInfo()  	gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH;  	gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD; +	gDebugInfo["CAFilename"] = gDirUtilp->getCAFile(); +  	gDebugInfo["CPUInfo"]["CPUString"] = gSysCPU.getCPUString();  	gDebugInfo["CPUInfo"]["CPUFamily"] = gSysCPU.getFamily();  	gDebugInfo["CPUInfo"]["CPUMhz"] = gSysCPU.getMhz(); @@ -2222,7 +2225,11 @@ void LLAppViewer::writeSystemInfo()  	gDebugInfo["RAMInfo"]["Physical"] = (LLSD::Integer)(gSysMemory.getPhysicalMemoryKB());  	gDebugInfo["RAMInfo"]["Allocated"] = (LLSD::Integer)(gMemoryAllocated>>10); // MB -> KB  	gDebugInfo["OSInfo"] = getOSInfo().getOSStringSimple(); -		 + +	// The user is not logged on yet, but record the current grid choice login url +	// which may have been the intended grid. This can b +	gDebugInfo["GridName"] = LLViewerLogin::getInstance()->getGridLabel(); +  	// *FIX:Mani - move this ddown in llappviewerwin32  #ifdef LL_WINDOWS  	DWORD thread_id = GetCurrentThreadId(); @@ -2246,6 +2253,8 @@ void LLAppViewer::writeSystemInfo()  	LL_INFOS("SystemInfo") << "Memory info:\n" << gSysMemory << LL_ENDL;  	LL_INFOS("SystemInfo") << "OS: " << getOSInfo().getOSStringSimple() << LL_ENDL;  	LL_INFOS("SystemInfo") << "OS info: " << getOSInfo() << LL_ENDL; + +	writeDebugInfo(); // Save out debug_info.log early, in case of crash.  }  void LLAppViewer::handleSyncViewerCrash() @@ -2259,9 +2268,6 @@ void LLAppViewer::handleViewerCrash()  {  	llinfos << "Handle viewer crash entry." << llendl; -	// Make sure the watchdog gets turned off... -// 	LLWatchdog::getInstance()->cleanup(); // SJB: This causes the Watchdog to hang for an extra 20-40s?! -  	LLAppViewer* pApp = LLAppViewer::instance();  	if (pApp->beingDebugged())  	{ @@ -2277,6 +2283,9 @@ void LLAppViewer::handleViewerCrash()  	}  	pApp->mReportedCrash = TRUE; +	// Make sure the watchdog gets turned off... +// 	pApp->destroyMainloopTimeout(); // SJB: Bah. This causes the crash handler to hang, not sure why. +	  	//We already do this in writeSystemInfo(), but we do it again here to make /sure/ we have a version  	//to check against no matter what  	gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); @@ -2365,7 +2374,7 @@ void LLAppViewer::handleViewerCrash()  	LLWorld::getInstance()->getInfo(gDebugInfo);  	// Close the debug file -	pApp->closeDebug(); +	pApp->writeDebugInfo();  	LLError::logToFile(""); diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 228f6e4baf..4bafca25a4 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -70,7 +70,7 @@ public:      bool quitRequested() { return mQuitRequested; }      bool logoutRequestSent() { return mLogoutRequestSent; } -	void closeDebug(); +	void writeDebugInfo();  	const LLOSInfo& getOSInfo() const { return mSysOSInfo; } diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index a03adfa338..6f5dc1d3e7 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -122,7 +122,11 @@ void LLDrawable::destroy()  		sNumZombieDrawables--;  	} -	LLFace::sDeleteLock = mFaces.size() ; +	if (LLSpatialGroup::sNoDelete) +	{ +		llerrs << "Illegal deletion of LLDrawable!" << llendl; +	} +  	std::for_each(mFaces.begin(), mFaces.end(), DeletePointer());  	mFaces.clear(); @@ -185,7 +189,6 @@ void LLDrawable::cleanupReferences()  {  	LLFastTimer t(LLFastTimer::FTM_PIPELINE); -	LLFace::sDeleteLock = mFaces.size() ;  	std::for_each(mFaces.begin(), mFaces.end(), DeletePointer());  	mFaces.clear(); @@ -279,7 +282,6 @@ void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerImag  	}  	else if (newFaces < (S32)mFaces.size())  	{ -		LLFace::sDeleteLock = (S32)mFaces.size() - newFaces ;  		std::for_each(mFaces.begin() + newFaces, mFaces.end(), DeletePointer());  		mFaces.erase(mFaces.begin() + newFaces, mFaces.end());  	} @@ -303,7 +305,6 @@ void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewer  	}  	else if (newFaces < (S32)mFaces.size())  	{ -		LLFace::sDeleteLock = (S32)mFaces.size() - newFaces ;  		std::for_each(mFaces.begin() + newFaces, mFaces.end(), DeletePointer());  		mFaces.erase(mFaces.begin() + newFaces, mFaces.end());  	} @@ -338,12 +339,8 @@ void LLDrawable::deleteFaces(S32 offset, S32 count)  	face_list_t::iterator face_begin = mFaces.begin() + offset;  	face_list_t::iterator face_end = face_begin + count; -	S32 end = (S32)mFaces.size() ; -	LLFace::sDeleteLock = count ;  	std::for_each(face_begin, face_end, DeletePointer());  	mFaces.erase(face_begin, face_end); - -	llassert_always(mFaces.size() == end - count) ;  }  void LLDrawable::update() @@ -521,7 +518,7 @@ F32 LLDrawable::updateXform(BOOL undamped)  	}  	if ((mCurrentScale != target_scale) || -		(!isRoot() && (dist_squared >= MIN_INTERPOLATE_DISTANCE_SQUARED*camdist2))) +		(!isRoot() && (dist_squared >= MIN_INTERPOLATE_DISTANCE_SQUARED) || !mVObjp->getAngularVelocity().isExactlyZero()))  	{ //child prim moving or scale change requires immediate rebuild  		gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE);  	} diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index 5cc4e37c97..fe2c2041ae 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -230,7 +230,6 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask  		if (texture && params.mTexture.notNull())  		{ -			llassert_always(gGL.getTexUnit(0)) ;  			gGL.getTexUnit(0)->activate();  			params.mTexture->bind();  			params.mTexture->addTextureStats(params.mVSize); diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index f1d88aa54a..04a7cfd8a0 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -452,7 +452,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)  		return;  	} -	if (single_avatar && avatarp->mSpecialRenderMode >= 2) // 2=image preview,  3=morph view +	if (single_avatar && avatarp->mSpecialRenderMode >= 1) // 1=anim preview, 2=image preview,  3=morph view  	{  		gPipeline.enableLightsAvatarEdit(LLColor4(.5f, .5f, .5f, 1.f));  	} diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 1784fccf1f..56dc61c1a3 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -556,30 +556,7 @@ void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL  	for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)   	{  		LLDrawInfo& params = **k; -		if (LLPipeline::sDynamicReflections) -		{ -			if (params.mReflectionMap.notNull()) -			{ -				params.mReflectionMap->bind(); -			} -			else -			{ -				if (params.mModelMatrix) -				{ -					sCubeMap = gPipeline.findReflectionMap(params.mModelMatrix->getTranslation());	 -				} - -				if (sCubeMap) -				{ -					sCubeMap->bind(); -				} -				else if (gSky.mVOSkyp->getCubeMap()) -				{ -					gSky.mVOSkyp->getCubeMap()->bind(); -				} -			} -		} -		 +			  		applyModelMatrix(params);  		params.mVertexBuffer->setBuffer(mask); @@ -607,10 +584,6 @@ BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params)  		if( tex )  		{  			bump = gBumpImageList.getBrightnessDarknessImage( tex, bump_code ); -			//------------------------------------------ -			//error check to make sure bump is valid -			llassert_always(!bump || bump->getNumRefs() == 1) ;			 -			//------------------------------------------  		}  		break; @@ -625,11 +598,6 @@ BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params)  	if (bump)  	{ -		//------------------------------------------ -		//error check to make sure bump is valid -		llassert_always(bump->getNumRefs() > 0 && bump->getNumRefs() < 100000) ; -		//------------------------------------------ -  		bump->bind(1);  		bump->bind(0);  		return TRUE; @@ -1121,22 +1089,6 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)  		{  			LLImageGL::unbindTexture(0);  		} - -		if (LLPipeline::sDynamicReflections) -		{ -			LLCubeMap* cube_map = params.mReflectionMap; - -			if (!cube_map && params.mModelMatrix) -			{ -				cube_map = gPipeline.findReflectionMap(params.mModelMatrix->getTranslation()); -			} - -			if (cube_map) -			{ -				cube_map->enableTexture(cube_channel); -				cube_map->bind(); -			}	 -		}  	}  	params.mVertexBuffer->setBuffer(mask); diff --git a/indra/newview/lldriverparam.cpp b/indra/newview/lldriverparam.cpp index b3daad9fb3..e88381d9e9 100644 --- a/indra/newview/lldriverparam.cpp +++ b/indra/newview/lldriverparam.cpp @@ -34,6 +34,7 @@  #include "lldriverparam.h"  #include "llfasttimer.h" +#include "llvoavatar.h"  //-----------------------------------------------------------------------------  // LLDriverParamInfo diff --git a/indra/newview/lldriverparam.h b/indra/newview/lldriverparam.h index 46b8609038..8170873849 100644 --- a/indra/newview/lldriverparam.h +++ b/indra/newview/lldriverparam.h @@ -32,9 +32,10 @@  #ifndef LL_LLDRIVERPARAM_H  #define LL_LLDRIVERPARAM_H -#include "llvoavatar.h"  #include "llviewervisualparam.h" +class LLVOAvatar; +  //-----------------------------------------------------------------------------  struct LLDrivenEntryInfo diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 8474762d9b..b2f5caa57d 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -57,7 +57,6 @@  extern BOOL gPickFaces;  BOOL LLFace::sSafeRenderSelect = TRUE; // FALSE -S32  LLFace::sDeleteLock = 0 ;  #define DOTVEC(a,b) (a.mV[0]*b.mV[0] + a.mV[1]*b.mV[1] + a.mV[2]*b.mV[2]) @@ -178,9 +177,6 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)  void LLFace::destroy()  { -	llassert_always(sDeleteLock >= 1); -	--sDeleteLock; -	  	mDrawablep = NULL;  	mVObjp = NULL; diff --git a/indra/newview/llface.h b/indra/newview/llface.h index 34c81c3fdd..0391cda66f 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -296,9 +296,6 @@ public:  				lhs->getTexture() < rhs->getTexture();  		}  	}; - -public://paranoia check only -	static S32 sDeleteLock ;  };  #endif // LL_LLFACE_H diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp index 6d4ff5a1a7..417ac0e868 100644 --- a/indra/newview/llfloateranimpreview.cpp +++ b/indra/newview/llfloateranimpreview.cpp @@ -76,13 +76,14 @@ const F32 PREVIEW_CAMERA_DISTANCE = 4.f;  const F32 MIN_CAMERA_ZOOM = 0.5f;  const F32 MAX_CAMERA_ZOOM = 10.f; +const F32 BASE_ANIM_TIME_OFFSET = 5.f; +  //-----------------------------------------------------------------------------  // LLFloaterAnimPreview()  //-----------------------------------------------------------------------------  LLFloaterAnimPreview::LLFloaterAnimPreview(const std::string& filename) :   	LLFloaterNameDesc(filename)  { -	mLastSliderValue = 0.f;  	mLastMouseX = 0;  	mLastMouseY = 0; @@ -414,20 +415,32 @@ void LLFloaterAnimPreview::resetMotion()  	LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();  	BOOL paused = avatarp->areAnimationsPaused(); -	mPauseRequest = NULL; +	// *TODO: Fix awful casting hack +	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(mMotionID); +	 +	// Set emotion +	std::string emote = childGetValue("emote_combo").asString(); +	motionp->setEmote(mIDList[emote]); -	LLUUID anim_id = mIDList[childGetValue("preview_base_anim").asString()]; -	avatarp->stopMotion(anim_id, TRUE); -	avatarp->stopMotion(mMotionID, TRUE); -	avatarp->startMotion(anim_id, 5.f); -	avatarp->startMotion(mMotionID); -	childSetValue("playback_slider", 0.0); -	mLastSliderValue = 0.0f; +	LLUUID base_id = mIDList[childGetValue("preview_base_anim").asString()]; +	avatarp->deactivateAllMotions(); +	avatarp->startMotion(base_id, BASE_ANIM_TIME_OFFSET); +	avatarp->startMotion(mMotionID, 0.0f); +	childSetValue("playback_slider", 0.0f); + +	// Set pose +	std::string handpose = childGetValue("hand_pose_combo").asString(); +	avatarp->startMotion( ANIM_AGENT_HAND_MOTION, 0.0f ); +	motionp->setHandPose(LLHandMotion::getHandPose(handpose));  	if (paused)  	{  		mPauseRequest = avatarp->requestPause();  	} +	else +	{ +		mPauseRequest = NULL;	 +	}  }  //----------------------------------------------------------------------------- @@ -538,7 +551,8 @@ void LLFloaterAnimPreview::onMouseCaptureLost()  void LLFloaterAnimPreview::onBtnPlay(void* user_data)  {  	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data; -	if (!previewp->getEnabled()) return; +	if (!previewp->getEnabled()) +		return;  	if (previewp->mMotionID.notNull() && previewp->mAnimPreview)  	{ @@ -569,22 +583,14 @@ void LLFloaterAnimPreview::onBtnPlay(void* user_data)  void LLFloaterAnimPreview::onBtnStop(void* user_data)  {  	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data; -	if (!previewp->getEnabled()) return; +	if (!previewp->getEnabled()) +		return;  	if (previewp->mMotionID.notNull() && previewp->mAnimPreview)  	{  		LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); - -		// is the motion looping and have we passed the loop in point? -		if (previewp->childGetValue("loop_check").asBoolean() &&  -			(F32)previewp->childGetValue("loop_in_point").asReal() <= (F32)previewp->childGetValue("playback_slider").asReal() * 100.f) -		{ -			avatarp->stopMotion(previewp->mMotionID, FALSE); -		} -		else -		{ -			avatarp->stopMotion(previewp->mMotionID, FALSE); -		} +		previewp->resetMotion(); +		previewp->mPauseRequest = avatarp->requestPause();  	}  } @@ -594,43 +600,24 @@ void LLFloaterAnimPreview::onBtnStop(void* user_data)  void LLFloaterAnimPreview::onSliderMove(LLUICtrl* ctrl, void*user_data)  {  	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data; -	if (!previewp->getEnabled()) return; +	if (!previewp->getEnabled()) +		return;  	if (previewp->mAnimPreview)  	{  		LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); +		F32 slider_value = (F32)previewp->childGetValue("playback_slider").asReal(); +		LLUUID base_id = previewp->mIDList[previewp->childGetValue("preview_base_anim").asString()];  		LLMotion* motionp = avatarp->findMotion(previewp->mMotionID); -		LLMotion* base_motionp =  -			avatarp->findMotion(previewp->mIDList[previewp->childGetValue("preview_base_anim").asString()]); - -		if (motionp && base_motionp) -		{ -			if (!avatarp->isMotionActive(previewp->mMotionID)) -			{  -				previewp->resetMotion(); -			} - -			previewp->mPauseRequest = avatarp->requestPause(); -			F32 original_activation_time = motionp->mActivationTimestamp; -			motionp->mActivationTimestamp -= ((F32)previewp->childGetValue("playback_slider").asReal() - previewp->mLastSliderValue) *  -				motionp->getDuration(); -			base_motionp->mActivationTimestamp -= ((F32)previewp->childGetValue("playback_slider").asReal() - previewp->mLastSliderValue) *  -				base_motionp->getDuration(); - -			if (motionp->mSendStopTimestamp != F32_MIN) -			{ -				motionp->mSendStopTimestamp = motionp->mSendStopTimestamp - original_activation_time + motionp->mActivationTimestamp; -			} - -			if (motionp->mStopTimestamp != F32_MIN) -			{ -				motionp->mStopTimestamp = motionp->mStopTimestamp - original_activation_time + motionp->mActivationTimestamp; -			} -			previewp->refresh(); -		} +		F32 duration = motionp->getDuration();// + motionp->getEaseOutDuration(); +		F32 delta_time = duration * slider_value; +		avatarp->deactivateAllMotions(); +		avatarp->startMotion(base_id, delta_time + BASE_ANIM_TIME_OFFSET); +		avatarp->startMotion(previewp->mMotionID, delta_time); +		previewp->mPauseRequest = avatarp->requestPause(); +		previewp->refresh();  	} -	previewp->mLastSliderValue = (F32)previewp->childGetValue("playback_slider").asReal();  }  //----------------------------------------------------------------------------- @@ -639,8 +626,8 @@ void LLFloaterAnimPreview::onSliderMove(LLUICtrl* ctrl, void*user_data)  void LLFloaterAnimPreview::onCommitBaseAnim(LLUICtrl* ctrl, void* data)  {  	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; - -	if (!previewp->getEnabled()) return; +	if (!previewp->getEnabled()) +		return;  	if (previewp->mAnimPreview)  	{ @@ -669,8 +656,9 @@ void LLFloaterAnimPreview::onCommitBaseAnim(LLUICtrl* ctrl, void* data)  void LLFloaterAnimPreview::onCommitLoop(LLUICtrl* ctrl, void* data)  {  	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; - -	if (!previewp->getEnabled()) return; +	if (!previewp->getEnabled()) +		return; +	  	LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();  	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); @@ -688,7 +676,8 @@ void LLFloaterAnimPreview::onCommitLoop(LLUICtrl* ctrl, void* data)  void LLFloaterAnimPreview::onCommitLoopIn(LLUICtrl* ctrl, void* data)  {  	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; -	if (!previewp->getEnabled()) return; +	if (!previewp->getEnabled()) +		return;  	LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();  	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); @@ -708,7 +697,8 @@ void LLFloaterAnimPreview::onCommitLoopIn(LLUICtrl* ctrl, void* data)  void LLFloaterAnimPreview::onCommitLoopOut(LLUICtrl* ctrl, void* data)  {  	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; -	if (!previewp->getEnabled()) return; +	if (!previewp->getEnabled()) +		return;  	LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();  	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); @@ -728,7 +718,8 @@ void LLFloaterAnimPreview::onCommitLoopOut(LLUICtrl* ctrl, void* data)  void LLFloaterAnimPreview::onCommitName(LLUICtrl* ctrl, void* data)  {  	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; -	if (!previewp->getEnabled()) return; +	if (!previewp->getEnabled()) +		return;  	LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();  	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); @@ -747,13 +738,10 @@ void LLFloaterAnimPreview::onCommitName(LLUICtrl* ctrl, void* data)  void LLFloaterAnimPreview::onCommitHandPose(LLUICtrl* ctrl, void* data)  {  	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; -	if (!previewp->getEnabled()) return; - -	LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); -	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); +	if (!previewp->getEnabled()) +		return; -	motionp->setHandPose(LLHandMotion::getHandPose(previewp->childGetValue("hand_pose_combo").asString())); -	previewp->resetMotion(); +	previewp->resetMotion(); // sets hand pose  }  //----------------------------------------------------------------------------- @@ -762,13 +750,10 @@ void LLFloaterAnimPreview::onCommitHandPose(LLUICtrl* ctrl, void* data)  void LLFloaterAnimPreview::onCommitEmote(LLUICtrl* ctrl, void* data)  {  	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; -	if (!previewp->getEnabled()) return; +	if (!previewp->getEnabled()) +		return; -	LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); -	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); - -	motionp->setEmote(previewp->mIDList[previewp->childGetValue("emote_combo").asString()]); -	previewp->resetMotion(); +	previewp->resetMotion(); // ssts emote  }  //----------------------------------------------------------------------------- @@ -777,7 +762,8 @@ void LLFloaterAnimPreview::onCommitEmote(LLUICtrl* ctrl, void* data)  void LLFloaterAnimPreview::onCommitPriority(LLUICtrl* ctrl, void* data)  {  	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; -	if (!previewp->getEnabled()) return; +	if (!previewp->getEnabled()) +		return;  	LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();  	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); @@ -791,7 +777,8 @@ void LLFloaterAnimPreview::onCommitPriority(LLUICtrl* ctrl, void* data)  void LLFloaterAnimPreview::onCommitEaseIn(LLUICtrl* ctrl, void* data)  {  	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; -	if (!previewp->getEnabled()) return; +	if (!previewp->getEnabled()) +		return;  	LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();  	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); @@ -806,7 +793,8 @@ void LLFloaterAnimPreview::onCommitEaseIn(LLUICtrl* ctrl, void* data)  void LLFloaterAnimPreview::onCommitEaseOut(LLUICtrl* ctrl, void* data)  {  	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; -	if (!previewp->getEnabled()) return; +	if (!previewp->getEnabled()) +		return;  	LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();  	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); @@ -820,9 +808,9 @@ void LLFloaterAnimPreview::onCommitEaseOut(LLUICtrl* ctrl, void* data)  //-----------------------------------------------------------------------------  BOOL LLFloaterAnimPreview::validateEaseIn(LLUICtrl* spin, void* data)  { -	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; -	 -	if (!previewp->getEnabled()) return FALSE; +	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;	 +	if (!previewp->getEnabled()) +		return FALSE;  	LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();  	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); @@ -843,7 +831,8 @@ BOOL LLFloaterAnimPreview::validateEaseOut(LLUICtrl* spin, void* data)  {  	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; -	if (!previewp->getEnabled()) return FALSE; +	if (!previewp->getEnabled()) +		return FALSE;  	LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();  	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); @@ -863,8 +852,8 @@ BOOL LLFloaterAnimPreview::validateEaseOut(LLUICtrl* spin, void* data)  BOOL LLFloaterAnimPreview::validateLoopIn(LLUICtrl* ctrl, void* data)  {  	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; - -	if (!previewp->getEnabled()) return FALSE; +	if (!previewp->getEnabled()) +		return FALSE;  	F32 loop_in_value = (F32)previewp->childGetValue("loop_in_point").asReal();  	F32 loop_out_value = (F32)previewp->childGetValue("loop_out_point").asReal(); @@ -892,8 +881,8 @@ BOOL LLFloaterAnimPreview::validateLoopIn(LLUICtrl* ctrl, void* data)  BOOL LLFloaterAnimPreview::validateLoopOut(LLUICtrl* spin, void* data)  {  	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; - -	if (!previewp->getEnabled()) return FALSE; +	if (!previewp->getEnabled()) +		return FALSE;  	F32 loop_out_value = (F32)previewp->childGetValue("loop_out_point").asReal();  	F32 loop_in_value = (F32)previewp->childGetValue("loop_in_point").asReal(); @@ -948,11 +937,8 @@ void LLFloaterAnimPreview::refresh()  			{  				if (motionp)  				{ -					F32 fraction_complete; -					fraction_complete = motionp->getLastUpdateTime() / motionp->getDuration(); - +					F32 fraction_complete = motionp->getLastUpdateTime() / motionp->getDuration();  					childSetValue("playback_slider", fraction_complete); -					mLastSliderValue = fraction_complete;  				}  				mPlayButton->setImages(std::string("button_anim_pause.tga"),  									   std::string("button_anim_pause_selected.tga")); @@ -965,7 +951,7 @@ void LLFloaterAnimPreview::refresh()  			mPlayButton->setImages(std::string("button_anim_play.tga"),  								   std::string("button_anim_play_selected.tga")); -			mStopButton->setEnabled(FALSE); +			mStopButton->setEnabled(TRUE); // stop also resets, leave enabled.  		}  		childEnable("ok_btn");  		mAnimPreview->requestUpdate(); @@ -1038,12 +1024,12 @@ LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLDynamicTexture  	mDummyAvatar = (LLVOAvatar*)gObjectList.createObjectViewer(LL_PCODE_LEGACY_AVATAR, gAgent.getRegion());  	mDummyAvatar->createDrawable(&gPipeline);  	mDummyAvatar->mIsDummy = TRUE; -	mDummyAvatar->mSpecialRenderMode = 2; +	mDummyAvatar->mSpecialRenderMode = 1;  	mDummyAvatar->setPositionAgent(LLVector3::zero);  	mDummyAvatar->slamPosition();  	mDummyAvatar->updateJointLODs();  	mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable); -	mDummyAvatar->startMotion(ANIM_AGENT_STAND, 5.f); +	mDummyAvatar->startMotion(ANIM_AGENT_STAND, BASE_ANIM_TIME_OFFSET);  	mDummyAvatar->mSkirtLOD.setVisible(FALSE, TRUE);  	gPipeline.markVisible(mDummyAvatar->mDrawable, *LLViewerCamera::getInstance()); @@ -1111,30 +1097,15 @@ BOOL	LLPreviewAnimation::render()  	//avatarp->setAnimationData("LookAtPoint", (void *)&mCameraRelPos); -	//RN: timestep must be zero, because paused animations will never initialize -	// av skeleton otherwise -	avatarp->setTimeStep(0.f); -	if (avatarp->areAnimationsPaused()) -	{ -		avatarp->updateMotion(TRUE); -	} -	else -	{ -		avatarp->updateMotion(); -	} +	//SJB: Animation is updated in LLVOAvatar::updateCharacter -	LLVertexBuffer::unbind(); -	avatarp->updateLOD(); -	 - -	avatarp->mRoot.updateWorldMatrixChildren(); - -	stop_glerror(); - -	LLGLDepthTest gls_depth(GL_TRUE); -  	if (avatarp->mDrawable.notNull())  	{ +		avatarp->updateLOD(); +		 +		LLVertexBuffer::unbind(); +		LLGLDepthTest gls_depth(GL_TRUE); +  		LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)avatarp->mDrawable->getFace(0)->getPool();  		avatarp->dirtyMesh();  		avatarPoolp->renderAvatars(avatarp);  // renders only one avatar diff --git a/indra/newview/llfloateranimpreview.h b/indra/newview/llfloateranimpreview.h index 693e3f8fbf..d13dfdcdb8 100644 --- a/indra/newview/llfloateranimpreview.h +++ b/indra/newview/llfloateranimpreview.h @@ -118,7 +118,6 @@ protected:  	S32					mLastMouseY;  	LLButton*			mPlayButton;  	LLButton*			mStopButton; -	F32					mLastSliderValue;  	LLRect				mPreviewRect;  	LLRectf				mPreviewImageRect;  	LLAssetID			mMotionID; diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp index a85b4ec0e9..ca3332e4ad 100644 --- a/indra/newview/llfloatergroups.cpp +++ b/indra/newview/llfloatergroups.cpp @@ -438,7 +438,8 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 pow  	{  		id = gAgent.mGroups.get(i).mID;  		LLGroupData* group_datap = &gAgent.mGroups.get(i); -		if ((group_datap->mPowers & powers_mask) != 0) { +		if ((powers_mask == GP_ALL_POWERS) || ((group_datap->mPowers & powers_mask) != 0)) +		{  			std::string style = "NORMAL";  			if(highlight_id == id)  			{ diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index d38121047a..d26acaa892 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -871,8 +871,6 @@ void LLFloaterWorldMap::buildLandmarkIDLists()  	{  		list->selectItemRange(1, -1);  		list->operateOnSelection(LLCtrlListInterface::OP_DELETE); - -		llassert_always(list->getItemCount() == 1) ;  	}  	mLandmarkItemIDList.reset(); diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index ea7413ea3f..7a1df7e3b2 100644 --- a/indra/newview/llhudeffectlookat.cpp +++ b/indra/newview/llhudeffectlookat.cpp @@ -503,8 +503,8 @@ void LLHUDEffectLookAt::render()  		LLVector3 target = mTargetPos + ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->mHeadp->getWorldPosition();  		glMatrixMode(GL_MODELVIEW); -		glPushMatrix(); -		glTranslatef(target.mV[VX], target.mV[VY], target.mV[VZ]); +		gGL.pushMatrix(); +		gGL.translatef(target.mV[VX], target.mV[VY], target.mV[VZ]);  		glScalef(0.3f, 0.3f, 0.3f);  		gGL.begin(LLVertexBuffer::LINES);  		{ @@ -519,7 +519,7 @@ void LLHUDEffectLookAt::render()  			gGL.vertex3f(0.f, 0.f, -1.f);  			gGL.vertex3f(0.f, 0.f, 1.f);  		} gGL.end(); -		glPopMatrix(); +		gGL.popMatrix();  	}  } diff --git a/indra/newview/llhudeffectpointat.cpp b/indra/newview/llhudeffectpointat.cpp index 93344db622..310b0331c9 100644 --- a/indra/newview/llhudeffectpointat.cpp +++ b/indra/newview/llhudeffectpointat.cpp @@ -331,8 +331,8 @@ void LLHUDEffectPointAt::render()  		LLGLSNoTexture gls_no_texture;  		LLVector3 target = mTargetPos + mSourceObject->getRenderPosition(); -		glPushMatrix(); -		glTranslatef(target.mV[VX], target.mV[VY], target.mV[VZ]); +		gGL.pushMatrix(); +		gGL.translatef(target.mV[VX], target.mV[VY], target.mV[VZ]);  		glScalef(0.3f, 0.3f, 0.3f);  		gGL.begin(LLVertexBuffer::LINES);  		{ @@ -346,7 +346,7 @@ void LLHUDEffectPointAt::render()  			gGL.vertex3f(0.f, 0.f, -1.f);  			gGL.vertex3f(0.f, 0.f, 1.f);  		} gGL.end(); -		glPopMatrix(); +		gGL.popMatrix();  	}  } diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 8a8321f9a0..754935edc6 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1215,6 +1215,12 @@ LLFloaterIMPanel::~LLFloaterIMPanel()  	delete mVoiceChannel;  	mVoiceChannel = NULL; + +	//delete focus lost callback +	if(mInputEditor) +	{ +		mInputEditor->setFocusLostCallback( NULL ); +	}  }  BOOL LLFloaterIMPanel::postBuild()  diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 8aa51ad048..d3671239bb 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -76,6 +76,7 @@  #include "llviewerinventory.h"  #include "llviewerobjectlist.h"  #include "llviewerwindow.h" +#include "llvoavatar.h"  #include "llwearable.h"  #include "llwearablelist.h"  #include "llviewermessage.h"  diff --git a/indra/newview/llmemoryview.cpp b/indra/newview/llmemoryview.cpp index ccaed78727..75f05f6d0c 100644 --- a/indra/newview/llmemoryview.cpp +++ b/indra/newview/llmemoryview.cpp @@ -41,6 +41,7 @@  #include "llfontgl.h"  #include "llmemtype.h" +#include "llcharacter.h"  #include "llui.h"  #include "llviewercontrol.h"  #include "llstat.h" @@ -120,6 +121,7 @@ static const struct mtv_display_info mtv_display_table[] =  	{ LLMemType::MTYPE_SPACE_PARTITION,	"Space Partition",	&LLColor4::blue2 },  	{ LLMemType::MTYPE_VERTEX_DATA,		"Vertex Buffer",	&LLColor4::blue3 },  	{ LLMemType::MTYPE_AVATAR,			"Avatar",			&LLColor4::purple1 }, +	{ LLMemType::MTYPE_ANIMATION,		"Animation",		&LLColor4::purple3 },  	{ LLMemType::MTYPE_REGIONS,			"Regions",			&LLColor4::blue1 },  	{ LLMemType::MTYPE_VOLUME,			"Volume",			&LLColor4::pink1 },  	{ LLMemType::MTYPE_PRIMITIVE,		"Profile",			&LLColor4::pink2 }, @@ -208,10 +210,25 @@ void LLMemoryView::draw()  			if (textw > labelwidth)  				labelwidth = textw;  		} + +		S32 num_avatars = 0; +		S32 num_motions = 0; +		S32 num_loading_motions = 0; +		S32 num_loaded_motions = 0; +		S32 num_active_motions = 0; +		S32 num_deprecated_motions = 0; +		for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); +			 iter != LLCharacter::sInstances.end(); ++iter) +		{ +			num_avatars++; +			(*iter)->getMotionController().incMotionCounts(num_motions, num_loading_motions, num_loaded_motions, num_active_motions, num_deprecated_motions); +		} +		  		x = xleft; -	        tdesc = llformat("Total Bytes: %d MB Overhead: %d KB", -					 LLMemType::sTotalMem >> 20, LLMemType::sOverheadMem >> 10); -         	LLFontGL::sMonospace->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); +		tdesc = llformat("Total Bytes: %d MB Overhead: %d KB Avs %d Motions:%d Loading:%d Loaded:%d Active:%d Dep:%d", +						 LLMemType::sTotalMem >> 20, LLMemType::sOverheadMem >> 10, +						 num_avatars, num_motions, num_loading_motions, num_loaded_motions, num_active_motions, num_deprecated_motions); +		LLFontGL::sMonospace->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);  	}  	// Bars diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index e2b5c821ae..5311a594fb 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -72,9 +72,6 @@  #include "llviewerobjectlist.h" -std::map<LLUUID, F32> LLMuteList::sUserVolumeSettings; - -  // "emptymutelist"  class LLDispatchEmptyMuteList : public LLDispatchHandler  { @@ -182,10 +179,19 @@ LLMuteList* LLMuteList::getInstance()  // LLMuteList()  //-----------------------------------------------------------------------------  LLMuteList::LLMuteList() : -	mIsLoaded(FALSE) +	mIsLoaded(FALSE), +	mUserVolumesLoaded(FALSE)  {  	gGenericDispatcher.addHandler("emptymutelist", &sDispatchEmptyMuteList); +} +void LLMuteList::loadUserVolumes() +{ +	// call once, after LLDir::setLindenUserDir() has been called +	if (mUserVolumesLoaded) +		return; +	mUserVolumesLoaded = TRUE; +	  	// load per-resident voice volume information  	// conceptually, this is part of the mute list information, although it is only stored locally  	std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "volume_settings.xml"); @@ -201,7 +207,7 @@ LLMuteList::LLMuteList() :  	for (LLSD::map_const_iterator iter = settings_llsd.beginMap();  		 iter != settings_llsd.endMap(); ++iter)  	{ -		sUserVolumeSettings.insert(std::make_pair(LLUUID(iter->first), (F32)iter->second.asReal())); +		mUserVolumeSettings.insert(std::make_pair(LLUUID(iter->first), (F32)iter->second.asReal()));  	}  } @@ -213,7 +219,7 @@ LLMuteList::~LLMuteList()  	std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "volume_settings.xml");  	LLSD settings_llsd; -	for(user_volume_map_t::iterator iter = sUserVolumeSettings.begin(); iter != sUserVolumeSettings.end(); ++iter) +	for(user_volume_map_t::iterator iter = mUserVolumeSettings.begin(); iter != mUserVolumeSettings.end(); ++iter)  	{  		settings_llsd[iter->first.asString()] = iter->second;  	} @@ -668,6 +674,8 @@ BOOL LLMuteList::isMuted(const LLUUID& id, const std::string& name, U32 flags) c  //-----------------------------------------------------------------------------  void LLMuteList::requestFromServer(const LLUUID& agent_id)  { +	loadUserVolumes(); +	  	std::string agent_id_string;  	std::string filename;  	agent_id.toString(agent_id_string); @@ -705,15 +713,15 @@ void LLMuteList::cache(const LLUUID& agent_id)  void LLMuteList::setSavedResidentVolume(const LLUUID& id, F32 volume)  {  	// store new value in volume settings file -	sUserVolumeSettings[id] = volume; +	mUserVolumeSettings[id] = volume;  }  F32 LLMuteList::getSavedResidentVolume(const LLUUID& id)  {  	const F32 DEFAULT_VOLUME = 0.5f; -	 -	user_volume_map_t::iterator found_it = sUserVolumeSettings.find(id); -	if (found_it != sUserVolumeSettings.end()) + +	user_volume_map_t::iterator found_it = mUserVolumeSettings.find(id); +	if (found_it != mUserVolumeSettings.end())  	{  		return found_it->second;  	} diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h index cc6f5c9762..c1b887b877 100644 --- a/indra/newview/llmutelist.h +++ b/indra/newview/llmutelist.h @@ -131,6 +131,8 @@ public:  	F32 getSavedResidentVolume(const LLUUID& id);  private: +	void loadUserVolumes(); +	  	BOOL loadFromFile(const std::string& filename);  	BOOL saveToFile(const std::string& filename); @@ -171,11 +173,12 @@ private:  	observer_set_t mObservers;  	BOOL mIsLoaded; +	BOOL mUserVolumesLoaded;  	friend class LLDispatchEmptyMuteList;  	typedef std::map<LLUUID, F32> user_volume_map_t;  -	static user_volume_map_t sUserVolumeSettings; +	user_volume_map_t mUserVolumeSettings;  };  class LLMuteListObserver diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index c252c54ad7..a8dc35f99c 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -777,9 +777,8 @@ void LLPanelLogin::getFields(std::string &firstname, std::string &lastname, std:  	remember = sInstance->childGetValue("remember_check");  } - -// static.  Return TRUE if user made a choice from the popup -BOOL LLPanelLogin::getServer(std::string &server, S32 &domain_name) +// static +BOOL LLPanelLogin::isGridComboDirty()  {  	BOOL user_picked = FALSE;  	if (!sInstance) @@ -789,25 +788,8 @@ BOOL LLPanelLogin::getServer(std::string &server, S32 &domain_name)  	else  	{  		LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); -		LLSD combo_val = combo->getValue(); -		if (LLSD::TypeInteger == combo_val.type()) -		{ -			domain_name = combo->getValue().asInteger(); - -			if ((S32)GRID_INFO_OTHER == domain_name) -			{ -				server = LLViewerLogin::getInstance()->getGridLabel(); -			} -		} -		else -		{ -			// no valid selection, return other -			domain_name = (S32)GRID_INFO_OTHER; -			server = combo_val.asString(); -		}  		user_picked = combo->isDirty();  	} -  	return user_picked;  } @@ -941,19 +923,13 @@ void LLPanelLogin::loadLoginPage()  	curl_free(curl_version);  	// Grid -	std::string grid; -	S32 grid_index; -	getServer( grid, grid_index ); +	char* curl_grid = curl_escape(LLViewerLogin::getInstance()->getGridLabel().c_str(), 0); +	oStr << "&grid=" << curl_grid; +	curl_free(curl_grid);  	gViewerWindow->setMenuBackgroundColor(false, !LLViewerLogin::getInstance()->isInProductionGrid());  	gLoginMenuBarView->setBackgroundColor(gMenuBarView->getBackgroundColor()); -	if (!grid.empty()) -	{ -		char* curl_grid = curl_escape(grid.c_str(), 0); -		oStr << "&grid=" << curl_grid; -		curl_free(curl_grid); -	}  #if USE_VIEWER_AUTH  	LLURLSimString::sInstance.parse(); @@ -1167,9 +1143,29 @@ void LLPanelLogin::onSelectServer(LLUICtrl*, void*)  {  	// The user twiddled with the grid choice ui.  	// apply the selection to the grid setting. -	std::string grid; +	std::string grid_label;  	S32 grid_index; -	getServer( grid, grid_index ); + +	LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); +	LLSD combo_val = combo->getValue(); + +	if (LLSD::TypeInteger == combo_val.type()) +	{ +		grid_index = combo->getValue().asInteger(); + +		if ((S32)GRID_INFO_OTHER == grid_index) +		{ +			// This happens if the user specifies a custom grid +			// via command line. +			grid_label = combo->getSimple(); +		} +	} +	else +	{ +		// no valid selection, return other +		grid_index = (S32)GRID_INFO_OTHER; +		grid_label = combo_val.asString(); +	}  	// This new seelction will override preset uris  	// from the command line. @@ -1178,11 +1174,10 @@ void LLPanelLogin::onSelectServer(LLUICtrl*, void*)  	if(grid_index != GRID_INFO_OTHER)  	{  		vl->setGridChoice((EGridInfo)grid_index); -		grid = vl->getGridLabel();  	}  	else  	{ -		vl->setGridChoice(grid); +		vl->setGridChoice(grid_label);  	}  	// grid changed so show new splash screen (possibly) diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 69bf54ecc4..2429ac0f1b 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -92,8 +92,8 @@ public:  	static void getFields(std::string& firstname, std::string& lastname,  						  std::string& password, BOOL& remember); -	static BOOL getServer(std::string& server, S32& domain_name); -	static void getLocation(std::string& location); +	static BOOL isGridComboDirty(); +	static void getLocation(std::string &location);  	static void close(); diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp index 868278472f..4e3d102b0e 100644 --- a/indra/newview/llpreviewanim.cpp +++ b/indra/newview/llpreviewanim.cpp @@ -194,6 +194,7 @@ void LLPreviewAnim::onClose(bool app_quitting)  		if (motion)  		{ +			// *TODO: minor memory leak here, user data is never deleted (Use real callbacks)  			motion->setDeactivateCallback(NULL, (void *)NULL);  		}  	} diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 7554778301..8ebaeb6758 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -4855,18 +4855,9 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)  		for (S32 pass = 0; pass < 2; pass++)  		{ -			LLObjectSelection::iterator end_ = mSelectedObjects->end();		 -			S32 num_nodes = mSelectedObjects->getNumNodes() ; -			LLObjectSelection::iterator prev_iter = mSelectedObjects->end();		  			for (LLObjectSelection::iterator iter = mSelectedObjects->begin();  				 iter != mSelectedObjects->end(); iter++)  			{ -				llassert_always(end_ == mSelectedObjects->end()) ;//mSelectedObjects should not grow -				llassert_always(prev_iter != iter) ; //iter should move -				llassert_always(num_nodes > 0) ; //iter should not circle inside mSelectedObjects. -				num_nodes-- ; -				prev_iter = iter ; -  				LLSelectNode* node = *iter;  				LLViewerObject* objectp = node->getObject();  				if (!objectp) diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index b6ef833709..a62b1ac56a 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1158,7 +1158,6 @@ void LLSpatialGroup::destroyGL()  	mVertexBuffer = NULL;  	mBufferMap.clear(); -	mReflectionMap = NULL;  	clearDrawMap();  	if (mOcclusionQuery) @@ -1350,7 +1349,6 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, U32 buffer_usage)  	mDepthMask = FALSE;  	mSlopRatio = 0.25f;  	mRenderByGroup = TRUE; -	mImageEnabled = FALSE;  	mInfiniteFarClip = FALSE;  	LLGLNamePool::registerPool(&sQueryPool); @@ -1564,12 +1562,7 @@ public:  	virtual void preprocess(LLSpatialGroup* group)  	{ -		if (LLPipeline::sDynamicReflections && -			group->mOctreeNode->getSize().mdV[0] == 16.0 &&  -			group->mDistance < 64.f) -		{ -			group->mSpatialPartition->markReimage(group); -		} +		  	}  	virtual void processGroup(LLSpatialGroup* group) @@ -1837,76 +1830,6 @@ BOOL earlyFail(LLCamera* camera, LLSpatialGroup* group)  	return TRUE;  } -void LLSpatialPartition::markReimage(LLSpatialGroup* group) -{ -	if (mImageEnabled && group->isState(LLSpatialGroup::IMAGE_DIRTY)) -	{	 -		if (!group->isState(LLSpatialGroup::IN_IMAGE_QUEUE)) -		{ -			group->setState(LLSpatialGroup::IN_IMAGE_QUEUE); -			mImageQueue.push(group); -		} -	} -} - -void LLSpatialPartition::processImagery(LLCamera* camera) -{ -	if (!mImageEnabled) -	{ -		return; -	} - -	U32 process_count = 1; - -	S32 pull_count = (S32) mImageQueue.size(); - -	while (process_count > 0 && pull_count > 0 && !mImageQueue.empty()) -	{ -		pull_count--; -		LLPointer<LLSpatialGroup> group = mImageQueue.front(); -		mImageQueue.pop(); -		 -		if (group->isDead()) -		{ -			continue; -		} - -		if (group->isState(LLSpatialGroup::GEOM_DIRTY)) -		{ //put it back -			mImageQueue.push(group);	 -			continue; -		} - -		group->clearState(LLSpatialGroup::IN_IMAGE_QUEUE); -		if (LLPipeline::sDynamicReflections) -		{ -			process_count--; -			LLVector3 origin = group->mBounds[0]; -			/*LLVector3 at = camera->getOrigin()-origin; -			at.normVec(); -			origin += at* (at * group->mBounds[1]);*/ - -			LLCamera cube_cam; -			cube_cam.setOrigin(origin); -			cube_cam.setFar(64.f); - -			LLPointer<LLCubeMap> cube_map = group->mReflectionMap; -			group->mReflectionMap = NULL; -			if (cube_map.isNull()) -			{ -				cube_map = new LLCubeMap(); -				cube_map->initGL(); -			} - -			gPipeline.generateReflectionMap(gPipeline.mCubeBuffer, cube_cam); -			gPipeline.blurReflectionMap(gPipeline.mCubeBuffer, cube_map); -			group->mReflectionMap = cube_map; -			group->setState(LLSpatialGroup::GEOM_DIRTY); -		} - -		group->clearState(LLSpatialGroup::IMAGE_DIRTY); -	} -}  void pushVerts(LLDrawInfo* params, U32 mask)  { diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index 6ea22c2f66..7e872915b9 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -66,7 +66,6 @@ public:  	LLPointer<LLVertexBuffer> mVertexBuffer;  	LLPointer<LLViewerImage> mTexture; -	LLPointer<LLCubeMap> mReflectionMap;  	LLColor4U mGlowColor;  	S32 mDebugColor;  	const LLMatrix4* mTextureMatrix; @@ -262,7 +261,6 @@ public:  	LLPointer<LLVertexBuffer> mVertexBuffer;  	F32*					mOcclusionVerts;  	GLuint					mOcclusionQuery; -	LLPointer<LLCubeMap>	mReflectionMap;  	U32 mBufferUsage;  	draw_map_t mDrawMap; @@ -314,8 +312,6 @@ public:  	virtual void rebuildGeom(LLSpatialGroup* group);  	S32 cull(LLCamera &camera, std::vector<LLDrawable *>* results = NULL, BOOL for_select = FALSE); // Cull on arbitrary frustum -	void markReimage(LLSpatialGroup* group); -	void processImagery(LLCamera* camera);  	BOOL isVisible(const LLVector3& v); @@ -326,23 +322,12 @@ public:  	void restoreGL();  	void resetVertexBuffers(); -protected: -	 -	typedef std::set<LLPointer<LLSpatialGroup> > spatial_group_set_t; -	spatial_group_set_t mSpatialGroups; - -	typedef std::queue<LLPointer<LLSpatialGroup> > spatial_group_queue_t; -	 -	//things that need an image update -	spatial_group_queue_t mImageQueue; -  public:  	LLSpatialGroup::OctreeNode* mOctree;  	BOOL mOcclusionEnabled; // if TRUE, occlusion culling is performed  	BOOL mInfiniteFarClip; // if TRUE, frustum culling ignores far clip plane  	U32 mBufferUsage;  	BOOL mRenderByGroup; -	BOOL mImageEnabled;  	U32 mLODSeed;  	U32 mLODPeriod;	//number of frames between LOD updates for a given spatial group (staggered by mLODSeed)  	U32 mVertexDataMask; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 7fe55d6efd..ada8ab5fdc 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -816,26 +816,11 @@ BOOL idle_startup()  		if (show_connect_box)  		{ -			// TODO only set loginuri based on server choice if ! USE_VIEWER_AUTH -			std::string server_label; -			S32 domain_name_index; -			BOOL user_picked_server = LLPanelLogin::getServer( server_label, domain_name_index ); -			if((EGridInfo)domain_name_index == GRID_INFO_OTHER) +			if ( LLPanelLogin::isGridComboDirty() )  			{ -				// Since the grid chosen was an 'other', set the choice by string.  -				LLViewerLogin::getInstance()->setGridChoice(server_label); -			} -			else -			{ -				// Set the choice according to index. -				LLViewerLogin::getInstance()->setGridChoice((EGridInfo)domain_name_index); -			} -			 -			if ( user_picked_server ) -			{   // User picked a grid from the popup, so clear the  -				// stored uris and they will be re-generated from the GridChoice +				// User picked a grid from the popup, so clear the  +				// stored uris and they will be reacquired from the grid choice.  				sAuthUris.clear(); -				LLViewerLogin::getInstance()->resetURIs();  			}  			std::string location; @@ -2224,6 +2209,18 @@ BOOL idle_startup()  	{  		do_normal_idle = TRUE; +		// Avoid generic Ruth avatar in Orientation Island by starting +		// our outfit load as soon as possible.  This will be replaced +		// with a more definitive patch from featurettes-4 later. JC +		if (gAgent.isFirstLogin() +			&& !gInitialOutfit.empty()  // registration set up an outfit +			&& gAgent.getAvatarObject()	// can't wear clothes until have obj +			&& !gAgent.isGenderChosen() ) // nothing already loaded +		{ +			llinfos << "Wearing initial outfit " << gInitialOutfit << llendl; +			callback_choose_gender(-1, NULL); +		} +  		F32 timeout_frac = timeout.getElapsedTimeF32()/PRECACHING_DELAY;  		// wait precache-delay and for agent's avatar or a lot longer.  		if(((timeout_frac > 1.f) && gAgent.getAvatarObject()) @@ -2234,7 +2231,7 @@ BOOL idle_startup()  		else  		{  			update_texture_fetch(); -			set_startup_status(0.60f + 0.40f * timeout_frac, +			set_startup_status(0.60f + 0.20f * timeout_frac,  				"Loading world...",  					gAgent.mMOTD);  		} @@ -2264,7 +2261,7 @@ BOOL idle_startup()  		else  		{  			update_texture_fetch(); -			set_startup_status(0.f + 0.25f * wearables_time / MAX_WEARABLES_TIME, +			set_startup_status(0.80f + 0.20f * wearables_time / MAX_WEARABLES_TIME,  							 LLTrans::getString("LoginDownloadingClothing"),  							 gAgent.mMOTD);  		} diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index b5de15d983..38319c8d8a 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -73,6 +73,8 @@ enum EStartupState{  // exported symbols  extern BOOL gAgentMovementCompleted;  extern LLPointer<LLImageGL> gStartImageGL; +extern std::string gInitialOutfit; +extern std::string gInitialOutfitGender;	// "male" or "female"  class LLStartUp  { diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h index 59a0660a94..befb262a4c 100644 --- a/indra/newview/lltexlayer.h +++ b/indra/newview/lltexlayer.h @@ -40,7 +40,6 @@  #include "lluuid.h"  #include "llviewerimage.h"  #include "llviewervisualparam.h" -#include "llvoavatar.h"  #include "llwearable.h"  #include "v4color.h"  #include "llfloater.h" diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index f32e4dd531..9a043b8d15 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -48,7 +48,6 @@  #include "llviewerregion.h"  ////////////////////////////////////////////////////////////////////////////// -  //static  class LLTextureFetchWorker : public LLWorkerClass  { @@ -435,6 +434,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,  LLTextureFetchWorker::~LLTextureFetchWorker()  { +	llassert_always(LLWorkerClass::sDeleteLock) ;  // 	llinfos << "Destroy: " << mID  // 			<< " Decoded=" << mDecodedDiscard  // 			<< " Requested=" << mRequestedDiscard @@ -1052,9 +1052,11 @@ bool LLTextureFetchWorker::processSimulatorPackets()  {  	if (mLastPacket >= mFirstPacket)  	{ +		llassert_always(mFormattedImage) ;  		S32 buffer_size = mFormattedImage->getDataSize();  		for (S32 i = mFirstPacket; i<=mLastPacket; i++)  		{ +			llassert_always(mPackets[i]) ;  			buffer_size += mPackets[i]->mSize;  		}  		bool have_all_data = mLastPacket >= mTotalPackets-1; @@ -1436,13 +1438,16 @@ void LLTextureFetch::removeFromNetworkQueue(LLTextureFetchWorker* worker)  // call lockQueue() first!  void LLTextureFetch::removeRequest(LLTextureFetchWorker* worker, bool cancel)  { -	mRequestMap.erase(worker->mID); +	size_t erased_1 = mRequestMap.erase(worker->mID); +	llassert_always(erased_1 > 0) ;  	size_t erased = mNetworkQueue.erase(worker->mID);  	if (cancel && erased > 0)  	{  		mCancelQueue[worker->mHost].insert(worker->mID);  	} -	worker->scheduleDelete(); +	llassert_always(!(worker->getFlags(LLWorkerClass::WCF_DELETE_REQUESTED))) ; + +	worker->scheduleDelete();	  }  // call lockQueue() first! diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 5954a7f0ff..b6bcf9544d 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -309,7 +309,13 @@ BOOL LLToolPie::pickAndShowMenu(S32 x, S32 y, MASK mask, BOOL always_show)  	}  	else if (mHitObjectID == gAgent.getID() )  	{ -		llassert_always(gPieSelf) ; +		if(!gPieSelf)  +		{ +			//either at very early startup stage or at late quitting stage, +			//this event is ignored. +			return TRUE ; +		} +  		gPieSelf->show(x, y, mPieMouseButtonDown);  	}  	else if (object) diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index eec1fff942..422546c811 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -447,7 +447,6 @@ void settings_setup_listeners()  	gSavedSettings.getControl("RenderTerrainDetail")->getSignal()->connect(boost::bind(&handleTerrainDetailChanged, _1));  	gSavedSettings.getControl("RenderAvatarVP")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1));  	gSavedSettings.getControl("VertexShaderEnable")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); -	gSavedSettings.getControl("RenderDynamicReflections")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1));  	gSavedSettings.getControl("RenderGlow")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _1));  	gSavedSettings.getControl("RenderGlow")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1));  	gSavedSettings.getControl("EnableRippleWater")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index b7b85105cc..d4249ce135 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -613,7 +613,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)  		if (!for_snapshot)  		{  			LLAppViewer::instance()->pingMainloopTimeout("Display:Imagery"); -			gPipeline.processImagery(*LLViewerCamera::getInstance());  			gPipeline.generateWaterReflection(*LLViewerCamera::getInstance());  		} @@ -823,6 +822,7 @@ void render_hud_attachments()  		//cull, sort, and render hud objects  		static LLCullResult result; +		LLSpatialGroup::sNoDelete = TRUE;  		gPipeline.updateCull(hud_cam, result);  		gPipeline.toggleRenderType(LLPipeline::RENDER_TYPE_BUMP); @@ -834,6 +834,8 @@ void render_hud_attachments()  		gPipeline.renderGeom(hud_cam); +		LLSpatialGroup::sNoDelete = FALSE; +  		render_hud_elements();  		//restore type mask  		gPipeline.setRenderTypeMask(mask); diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp index 176bf9273a..71d98b73de 100644 --- a/indra/newview/llviewerjoint.cpp +++ b/indra/newview/llviewerjoint.cpp @@ -118,123 +118,124 @@ void LLViewerJoint::setValid( BOOL valid, BOOL recursive )  //--------------------------------------------------------------------  // renderSkeleton() +// DEBUG (UNUSED)  //-------------------------------------------------------------------- -void LLViewerJoint::renderSkeleton(BOOL recursive) -{ -	F32 nc = 0.57735f; - -	//---------------------------------------------------------------- -	// push matrix stack -	//---------------------------------------------------------------- -	glPushMatrix(); - -	//---------------------------------------------------------------- -	// render the bone to my parent -	//---------------------------------------------------------------- -	if (mComponents & SC_BONE) -	{ -		drawBone(); -	} - -	//---------------------------------------------------------------- -	// offset to joint position and  -	// rotate to our orientation -	//---------------------------------------------------------------- -	glLoadIdentity(); -	glMultMatrixf( &getWorldMatrix().mMatrix[0][0] ); - -	//---------------------------------------------------------------- -	// render joint axes -	//---------------------------------------------------------------- -	if (mComponents & SC_AXES) -	{ -		gGL.begin(LLVertexBuffer::LINES); -		gGL.color3f( 1.0f, 0.0f, 0.0f ); -		gGL.vertex3f( 0.0f,            0.0f, 0.0f ); -		gGL.vertex3f( 0.1f, 0.0f, 0.0f ); - -		gGL.color3f( 0.0f, 1.0f, 0.0f ); -		gGL.vertex3f( 0.0f, 0.0f,            0.0f ); -		gGL.vertex3f( 0.0f, 0.1f, 0.0f ); - -		gGL.color3f( 0.0f, 0.0f, 1.0f ); -		gGL.vertex3f( 0.0f, 0.0f, 0.0f ); -		gGL.vertex3f( 0.0f, 0.0f, 0.1f ); -		gGL.end(); -	} - -	//---------------------------------------------------------------- -	// render the joint graphic -	//---------------------------------------------------------------- -	if (mComponents & SC_JOINT) -	{ -		gGL.color3f( 1.0f, 1.0f, 0.0f ); - -		gGL.begin(LLVertexBuffer::TRIANGLES); - -		// joint top half -		glNormal3f(nc, nc, nc); -		gGL.vertex3f(0.0f,             0.0f, 0.05f); -		gGL.vertex3f(0.05f,       0.0f,       0.0f); -		gGL.vertex3f(0.0f,       0.05f,       0.0f); - -		glNormal3f(-nc, nc, nc); -		gGL.vertex3f(0.0f,             0.0f, 0.05f); -		gGL.vertex3f(0.0f,       0.05f,       0.0f); -		gGL.vertex3f(-0.05f,      0.0f,       0.0f); +// void LLViewerJoint::renderSkeleton(BOOL recursive) +// { +// 	F32 nc = 0.57735f; + +// 	//---------------------------------------------------------------- +// 	// push matrix stack +// 	//---------------------------------------------------------------- +// 	glPushMatrix(); + +// 	//---------------------------------------------------------------- +// 	// render the bone to my parent +// 	//---------------------------------------------------------------- +// 	if (mComponents & SC_BONE) +// 	{ +// 		drawBone(); +// 	} + +// 	//---------------------------------------------------------------- +// 	// offset to joint position and  +// 	// rotate to our orientation +// 	//---------------------------------------------------------------- +// 	glLoadIdentity(); +// 	glMultMatrixf( &getWorldMatrix().mMatrix[0][0] ); + +// 	//---------------------------------------------------------------- +// 	// render joint axes +// 	//---------------------------------------------------------------- +// 	if (mComponents & SC_AXES) +// 	{ +// 		gGL.begin(LLVertexBuffer::LINES); +// 		gGL.color3f( 1.0f, 0.0f, 0.0f ); +// 		gGL.vertex3f( 0.0f,            0.0f, 0.0f ); +// 		gGL.vertex3f( 0.1f, 0.0f, 0.0f ); + +// 		gGL.color3f( 0.0f, 1.0f, 0.0f ); +// 		gGL.vertex3f( 0.0f, 0.0f,            0.0f ); +// 		gGL.vertex3f( 0.0f, 0.1f, 0.0f ); + +// 		gGL.color3f( 0.0f, 0.0f, 1.0f ); +// 		gGL.vertex3f( 0.0f, 0.0f, 0.0f ); +// 		gGL.vertex3f( 0.0f, 0.0f, 0.1f ); +// 		gGL.end(); +// 	} + +// 	//---------------------------------------------------------------- +// 	// render the joint graphic +// 	//---------------------------------------------------------------- +// 	if (mComponents & SC_JOINT) +// 	{ +// 		gGL.color3f( 1.0f, 1.0f, 0.0f ); + +// 		gGL.begin(LLVertexBuffer::TRIANGLES); + +// 		// joint top half +// 		glNormal3f(nc, nc, nc); +// 		gGL.vertex3f(0.0f,             0.0f, 0.05f); +// 		gGL.vertex3f(0.05f,       0.0f,       0.0f); +// 		gGL.vertex3f(0.0f,       0.05f,       0.0f); + +// 		glNormal3f(-nc, nc, nc); +// 		gGL.vertex3f(0.0f,             0.0f, 0.05f); +// 		gGL.vertex3f(0.0f,       0.05f,       0.0f); +// 		gGL.vertex3f(-0.05f,      0.0f,       0.0f); -		glNormal3f(-nc, -nc, nc); -		gGL.vertex3f(0.0f,             0.0f, 0.05f); -		gGL.vertex3f(-0.05f,      0.0f,      0.0f); -		gGL.vertex3f(0.0f,      -0.05f,      0.0f); - -		glNormal3f(nc, -nc, nc); -		gGL.vertex3f(0.0f,              0.0f, 0.05f); -		gGL.vertex3f(0.0f,       -0.05f,       0.0f); -		gGL.vertex3f(0.05f,        0.0f,       0.0f); +// 		glNormal3f(-nc, -nc, nc); +// 		gGL.vertex3f(0.0f,             0.0f, 0.05f); +// 		gGL.vertex3f(-0.05f,      0.0f,      0.0f); +// 		gGL.vertex3f(0.0f,      -0.05f,      0.0f); + +// 		glNormal3f(nc, -nc, nc); +// 		gGL.vertex3f(0.0f,              0.0f, 0.05f); +// 		gGL.vertex3f(0.0f,       -0.05f,       0.0f); +// 		gGL.vertex3f(0.05f,        0.0f,       0.0f); -		// joint bottom half -		glNormal3f(nc, nc, -nc); -		gGL.vertex3f(0.0f,             0.0f, -0.05f); -		gGL.vertex3f(0.0f,       0.05f,        0.0f); -		gGL.vertex3f(0.05f,       0.0f,        0.0f); - -		glNormal3f(-nc, nc, -nc); -		gGL.vertex3f(0.0f,             0.0f, -0.05f); -		gGL.vertex3f(-0.05f,      0.0f,        0.0f); -		gGL.vertex3f(0.0f,       0.05f,        0.0f); +// 		// joint bottom half +// 		glNormal3f(nc, nc, -nc); +// 		gGL.vertex3f(0.0f,             0.0f, -0.05f); +// 		gGL.vertex3f(0.0f,       0.05f,        0.0f); +// 		gGL.vertex3f(0.05f,       0.0f,        0.0f); + +// 		glNormal3f(-nc, nc, -nc); +// 		gGL.vertex3f(0.0f,             0.0f, -0.05f); +// 		gGL.vertex3f(-0.05f,      0.0f,        0.0f); +// 		gGL.vertex3f(0.0f,       0.05f,        0.0f); -		glNormal3f(-nc, -nc, -nc); -		gGL.vertex3f(0.0f,              0.0f, -0.05f); -		gGL.vertex3f(0.0f,       -0.05f,        0.0f); -		gGL.vertex3f(-0.05f,       0.0f,        0.0f); - -		glNormal3f(nc, -nc, -nc); -		gGL.vertex3f(0.0f,             0.0f,  -0.05f); -		gGL.vertex3f(0.05f,       0.0f,         0.0f); -		gGL.vertex3f(0.0f,      -0.05f,         0.0f); +// 		glNormal3f(-nc, -nc, -nc); +// 		gGL.vertex3f(0.0f,              0.0f, -0.05f); +// 		gGL.vertex3f(0.0f,       -0.05f,        0.0f); +// 		gGL.vertex3f(-0.05f,       0.0f,        0.0f); + +// 		glNormal3f(nc, -nc, -nc); +// 		gGL.vertex3f(0.0f,             0.0f,  -0.05f); +// 		gGL.vertex3f(0.05f,       0.0f,         0.0f); +// 		gGL.vertex3f(0.0f,      -0.05f,         0.0f); -		gGL.end(); -	} - -	//---------------------------------------------------------------- -	// render children -	//---------------------------------------------------------------- -	if (recursive) -	{ -		for (child_list_t::iterator iter = mChildren.begin(); -			 iter != mChildren.end(); ++iter) -		{ -			LLViewerJoint* joint = (LLViewerJoint*)(*iter); -			joint->renderSkeleton(); -		} -	} - -	//---------------------------------------------------------------- -	// pop matrix stack -	//---------------------------------------------------------------- -	glPopMatrix(); -} +// 		gGL.end(); +// 	} + +// 	//---------------------------------------------------------------- +// 	// render children +// 	//---------------------------------------------------------------- +// 	if (recursive) +// 	{ +// 		for (child_list_t::iterator iter = mChildren.begin(); +// 			 iter != mChildren.end(); ++iter) +// 		{ +// 			LLViewerJoint* joint = (LLViewerJoint*)(*iter); +// 			joint->renderSkeleton(); +// 		} +// 	} + +// 	//---------------------------------------------------------------- +// 	// pop matrix stack +// 	//---------------------------------------------------------------- +// 	glPopMatrix(); +// }  //-------------------------------------------------------------------- @@ -330,59 +331,60 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass )  //--------------------------------------------------------------------  // drawBone() +// DEBUG (UNUSED)  //-------------------------------------------------------------------- -void LLViewerJoint::drawBone() -{ -	if ( mParent == NULL ) -		return; +// void LLViewerJoint::drawBone() +// { +// 	if ( mParent == NULL ) +// 		return; -	F32 boneSize = 0.02f; +// 	F32 boneSize = 0.02f; -	// rotate to point to child (bone direction) -	glPushMatrix(); +// 	// rotate to point to child (bone direction) +// 	glPushMatrix(); -	LLVector3 boneX = getPosition(); -	F32 length = boneX.normVec(); +// 	LLVector3 boneX = getPosition(); +// 	F32 length = boneX.normVec(); -	LLVector3 boneZ(1.0f, 0.0f, 1.0f); +// 	LLVector3 boneZ(1.0f, 0.0f, 1.0f); -	LLVector3 boneY = boneZ % boneX; -	boneY.normVec(); +// 	LLVector3 boneY = boneZ % boneX; +// 	boneY.normVec(); -	boneZ = boneX % boneY; +// 	boneZ = boneX % boneY; -	LLMatrix4 rotateMat; -	rotateMat.setFwdRow( boneX ); -	rotateMat.setLeftRow( boneY ); -	rotateMat.setUpRow( boneZ ); -	glMultMatrixf( &rotateMat.mMatrix[0][0] ); +// 	LLMatrix4 rotateMat; +// 	rotateMat.setFwdRow( boneX ); +// 	rotateMat.setLeftRow( boneY ); +// 	rotateMat.setUpRow( boneZ ); +// 	glMultMatrixf( &rotateMat.mMatrix[0][0] ); -	// render the bone -	gGL.color3f( 0.5f, 0.5f, 0.0f ); +// 	// render the bone +// 	gGL.color3f( 0.5f, 0.5f, 0.0f ); -	gGL.begin(LLVertexBuffer::TRIANGLES); +// 	gGL.begin(LLVertexBuffer::TRIANGLES); -	gGL.vertex3f( length,     0.0f,       0.0f); -	gGL.vertex3f( 0.0f,       boneSize,  0.0f); -	gGL.vertex3f( 0.0f,       0.0f,       boneSize); +// 	gGL.vertex3f( length,     0.0f,       0.0f); +// 	gGL.vertex3f( 0.0f,       boneSize,  0.0f); +// 	gGL.vertex3f( 0.0f,       0.0f,       boneSize); -	gGL.vertex3f( length,     0.0f,        0.0f); -	gGL.vertex3f( 0.0f,       0.0f,        -boneSize); -	gGL.vertex3f( 0.0f,       boneSize,   0.0f); +// 	gGL.vertex3f( length,     0.0f,        0.0f); +// 	gGL.vertex3f( 0.0f,       0.0f,        -boneSize); +// 	gGL.vertex3f( 0.0f,       boneSize,   0.0f); -	gGL.vertex3f( length,     0.0f,        0.0f); -	gGL.vertex3f( 0.0f,       -boneSize,  0.0f); -	gGL.vertex3f( 0.0f,       0.0f,        -boneSize); +// 	gGL.vertex3f( length,     0.0f,        0.0f); +// 	gGL.vertex3f( 0.0f,       -boneSize,  0.0f); +// 	gGL.vertex3f( 0.0f,       0.0f,        -boneSize); -	gGL.vertex3f( length,     0.0f,        0.0f); -	gGL.vertex3f( 0.0f,       0.0f,        boneSize); -	gGL.vertex3f( 0.0f,       -boneSize,  0.0f); +// 	gGL.vertex3f( length,     0.0f,        0.0f); +// 	gGL.vertex3f( 0.0f,       0.0f,        boneSize); +// 	gGL.vertex3f( 0.0f,       -boneSize,  0.0f); -	gGL.end(); +// 	gGL.end(); -	// restore matrix -	glPopMatrix(); -} +// 	// restore matrix +// 	glPopMatrix(); +// }  //--------------------------------------------------------------------  // isTransparent() @@ -437,13 +439,13 @@ void LLViewerJoint::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind)  	}  } -void LLViewerJoint::updateGeometry() +void LLViewerJoint::updateJointGeometry()  {  	for (child_list_t::iterator iter = mChildren.begin();  		 iter != mChildren.end(); ++iter)  	{  		LLViewerJoint* joint = (LLViewerJoint*)(*iter); -		joint->updateGeometry(); +		joint->updateJointGeometry();  	}  } diff --git a/indra/newview/llviewerjoint.h b/indra/newview/llviewerjoint.h index 605f40979b..07d1f4c235 100644 --- a/indra/newview/llviewerjoint.h +++ b/indra/newview/llviewerjoint.h @@ -60,7 +60,12 @@ public:  	// Primarily for debugging and character setup  	// Derived classes may add text/graphic output.  	// Draw skeleton graphic for debugging and character setup -	virtual void renderSkeleton(BOOL recursive=TRUE); + 	void renderSkeleton(BOOL recursive=TRUE); // debug only (unused) + +	// Draws a bone graphic to the parent joint. +	// Derived classes may add text/graphic output. +	// Called by renderSkeleton(). + 	void drawBone(); // debug only (unused)  	// Render character hierarchy.  	// Traverses the entire joint hierarchy, setting up @@ -68,11 +73,6 @@ public:  	// Derived classes may add text/graphic output.  	virtual U32 render( F32 pixelArea, BOOL first_pass = TRUE );	// Returns triangle count -	// Draws a bone graphic to the parent joint. -	// Derived classes may add text/graphic output. -	// Called by renderSkeleton(). -	virtual void drawBone(); -  	// Returns true if this object is transparent.  	// This is used to determine in which order to draw objects.  	virtual BOOL isTransparent(); @@ -127,7 +127,7 @@ public:  	virtual void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area);  	virtual void updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind = FALSE);  	virtual BOOL updateLOD(F32 pixel_area, BOOL activate); -	virtual void updateGeometry(); +	virtual void updateJointGeometry();  	virtual void dump();  	void setVisible( BOOL visible, BOOL recursive ); diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index ce61c3a2cd..0a2e328015 100644 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -56,7 +56,6 @@ extern LLPipeline gPipeline;  // LLViewerJointAttachment()  //-----------------------------------------------------------------------------  LLViewerJointAttachment::LLViewerJointAttachment() : -mJoint(NULL),  mAttachedObject(NULL),  mVisibleInFirst(FALSE),  mGroup(0), diff --git a/indra/newview/llviewerjointattachment.h b/indra/newview/llviewerjointattachment.h index aa41252ab9..81e72e18b3 100644 --- a/indra/newview/llviewerjointattachment.h +++ b/indra/newview/llviewerjointattachment.h @@ -68,7 +68,6 @@ public:  	// accessors  	// -	void setJoint (LLJoint* joint) { mJoint = joint; }  	void setPieSlice(S32 pie_slice) { mPieSlice = pie_slice; }	  	void setVisibleInFirstPerson(BOOL visibility) { mVisibleInFirst = visibility; }  	BOOL getVisibleInFirstPerson() { return mVisibleInFirst; } @@ -99,7 +98,6 @@ protected:  	void calcLOD();  protected: -	LLJoint*		mJoint;  	// Backlink only; don't make this an LLPointer.  	LLViewerObject*	mAttachedObject;  	BOOL			mVisibleInFirst; diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 8772149a86..95166278d5 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -873,7 +873,7 @@ void LLViewerJointMesh::updateVectorize()  	}  } -void LLViewerJointMesh::updateGeometry() +void LLViewerJointMesh::updateJointGeometry()  {  	if (!(mValid  		  && mMesh diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h index 4cef1552ca..3de9076c3d 100644 --- a/indra/newview/llviewerjointmesh.h +++ b/indra/newview/llviewerjointmesh.h @@ -142,7 +142,7 @@ public:  	/*virtual*/ void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area);  	/*virtual*/ void updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind = FALSE);  	/*virtual*/ BOOL updateLOD(F32 pixel_area, BOOL activate); -	/*virtual*/ void updateGeometry(); +	/*virtual*/ void updateJointGeometry();  	/*virtual*/ void dump();  	void setIsTransparent(BOOL is_transparent) { mIsTransparent = is_transparent; } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 946167b90e..347ddac797 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1429,11 +1429,6 @@ void init_debug_rendering_menu(LLMenuGL* menu)  	item = new LLMenuItemCheckGL("Run Multiple Threads", menu_toggle_control, NULL, menu_check_control, (void*)"RunMultipleThreads");  	menu->append(item); -#ifndef LL_RELEASE_FOR_DOWNLOAD -	item = new LLMenuItemCheckGL("Dynamic Reflections", menu_toggle_control, NULL, menu_check_control, (void*)"RenderDynamicReflections"); -	menu->append(item); -#endif -	  	item = new LLMenuItemCheckGL("Cheesy Beacon", menu_toggle_control, NULL, menu_check_control, (void*)"CheesyBeacon");  	menu->append(item); diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index d2d8f774a0..23bec37064 100644 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -120,13 +120,8 @@ static LLGridData gGridInfo[GRID_INFO_COUNT] =  	  "" }  }; -#if LL_RELEASE_FOR_DOWNLOAD -	// Default userserver for production builds is agni -	const EGridInfo DEFAULT_GRID_CHOICE = GRID_INFO_AGNI; -#else -	// Default userserver for development builds is none -	const EGridInfo DEFAULT_GRID_CHOICE = GRID_INFO_NONE; -#endif +const EGridInfo DEFAULT_GRID_CHOICE = GRID_INFO_AGNI; +  unsigned char gMACAddress[MAC_ADDRESS_BYTES];		/* Flawfinder: ignore */ @@ -142,7 +137,7 @@ void LLViewerLogin::setGridChoice(EGridInfo grid)  		llerrs << "Invalid grid index specified." << llendl;  	} -	if(mGridChoice != grid) +	if(mGridChoice != grid || gSavedSettings.getS32("ServerChoice") != grid)  	{  		mGridChoice = grid;  		if(GRID_INFO_LOCAL == mGridChoice) diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 1c0aaec29a..8cd295b8a8 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -685,7 +685,6 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)  			idle_iter != idle_list.end(); idle_iter++)  		{  			objectp = *idle_iter; -			llassert_always(objectp) ;  			if (!objectp->idleUpdate(agent, world, frame_time))  			{  				//  If Idle Update returns false, kill object! diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index b90f665abd..8588d99b21 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -52,6 +52,7 @@  #include "lldebugview.h"  #include "llfasttimerview.h"  #include "llviewerregion.h" +#include "llvoavatar.h"  #include "llfloaterhtml.h"  #include "llviewerwindow.h"		// *TODO: remove, only used for width/height  #include "llworld.h" diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 068f4c86e9..b37b66effa 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4477,7 +4477,6 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei  			else  			{  				display(do_rebuild, scale_factor, subimage_x+(subimage_y*llceil(scale_factor)), use_fbo); -				render_ui_and_swap();  			}  			S32 subimage_x_offset = llclamp(buffer_x_offset - (subimage_x * window_width), 0, window_width); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4b7ad71e80..cf2c094ded 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -886,52 +886,53 @@ LLVOAvatar::LLVOAvatar(  	if (LLCharacter::sInstances.size() == 1)  	{  		LLKeyframeMotion::setVFS(gStaticVFS); -		addMotion( ANIM_AGENT_BUSY,						LLNullMotion::create ); -		addMotion( ANIM_AGENT_CROUCH,					LLKeyframeStandMotion::create ); -		addMotion( ANIM_AGENT_CROUCHWALK,				LLKeyframeWalkMotion::create ); -		addMotion( ANIM_AGENT_EXPRESS_AFRAID,			LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_ANGER,			LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_BORED,			LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_CRY,				LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_DISDAIN,			LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_EMBARRASSED,		LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_FROWN,			LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_KISS,				LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_LAUGH,			LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_OPEN_MOUTH,		LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_REPULSED,			LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_SAD,				LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_SHRUG,			LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_SMILE,			LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_SURPRISE,			LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_TONGUE_OUT,		LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_TOOTHSMILE,		LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_WINK,				LLEmote::create ); -		addMotion( ANIM_AGENT_EXPRESS_WORRY,			LLEmote::create ); -		addMotion( ANIM_AGENT_RUN,						LLKeyframeWalkMotion::create ); -		addMotion( ANIM_AGENT_STAND,					LLKeyframeStandMotion::create ); -		addMotion( ANIM_AGENT_STAND_1,					LLKeyframeStandMotion::create ); -		addMotion( ANIM_AGENT_STAND_2,					LLKeyframeStandMotion::create ); -		addMotion( ANIM_AGENT_STAND_3,					LLKeyframeStandMotion::create ); -		addMotion( ANIM_AGENT_STAND_4,					LLKeyframeStandMotion::create ); -		addMotion( ANIM_AGENT_STANDUP,					LLKeyframeFallMotion::create ); -		addMotion( ANIM_AGENT_TURNLEFT,					LLKeyframeWalkMotion::create ); -		addMotion( ANIM_AGENT_TURNRIGHT,				LLKeyframeWalkMotion::create ); -		addMotion( ANIM_AGENT_WALK,						LLKeyframeWalkMotion::create ); +		registerMotion( ANIM_AGENT_BUSY,					LLNullMotion::create ); +		registerMotion( ANIM_AGENT_CROUCH,					LLKeyframeStandMotion::create ); +		registerMotion( ANIM_AGENT_CROUCHWALK,				LLKeyframeWalkMotion::create ); +		registerMotion( ANIM_AGENT_EXPRESS_AFRAID,			LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_ANGER,			LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_BORED,			LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_CRY,				LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_DISDAIN,			LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_EMBARRASSED,		LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_FROWN,			LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_KISS,			LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_LAUGH,			LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_OPEN_MOUTH,		LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_REPULSED,		LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_SAD,				LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_SHRUG,			LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_SMILE,			LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_SURPRISE,		LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_TONGUE_OUT,		LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_TOOTHSMILE,		LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_WINK,			LLEmote::create ); +		registerMotion( ANIM_AGENT_EXPRESS_WORRY,			LLEmote::create ); +		registerMotion( ANIM_AGENT_RUN,						LLKeyframeWalkMotion::create ); +		registerMotion( ANIM_AGENT_STAND,					LLKeyframeStandMotion::create ); +		registerMotion( ANIM_AGENT_STAND_1,					LLKeyframeStandMotion::create ); +		registerMotion( ANIM_AGENT_STAND_2,					LLKeyframeStandMotion::create ); +		registerMotion( ANIM_AGENT_STAND_3,					LLKeyframeStandMotion::create ); +		registerMotion( ANIM_AGENT_STAND_4,					LLKeyframeStandMotion::create ); +		registerMotion( ANIM_AGENT_STANDUP,					LLKeyframeFallMotion::create ); +		registerMotion( ANIM_AGENT_TURNLEFT,				LLKeyframeWalkMotion::create ); +		registerMotion( ANIM_AGENT_TURNRIGHT,				LLKeyframeWalkMotion::create ); +		registerMotion( ANIM_AGENT_WALK,					LLKeyframeWalkMotion::create );  		// motions without a start/stop bit -		addMotion( ANIM_AGENT_BODY_NOISE,				LLBodyNoiseMotion::create ); -		addMotion( ANIM_AGENT_BREATHE_ROT,				LLBreatheMotionRot::create ); -		addMotion( ANIM_AGENT_EDITING,					LLEditingMotion::create	); -		addMotion( ANIM_AGENT_EYE,						LLEyeMotion::create	); -		addMotion( ANIM_AGENT_FEMALE_WALK,				LLKeyframeWalkMotion::create ); -		addMotion( ANIM_AGENT_FLY_ADJUST,				LLFlyAdjustMotion::create ); -		addMotion( ANIM_AGENT_HAND_MOTION,				LLHandMotion::create ); -		addMotion( ANIM_AGENT_HEAD_ROT,					LLHeadRotMotion::create ); -		addMotion( ANIM_AGENT_PELVIS_FIX,				LLPelvisFixMotion::create ); -		addMotion( ANIM_AGENT_SIT_FEMALE,				LLKeyframeMotion::create ); -		addMotion( ANIM_AGENT_TARGET,					LLTargetingMotion::create ); -		addMotion( ANIM_AGENT_WALK_ADJUST,				LLWalkAdjustMotion::create ); +		registerMotion( ANIM_AGENT_BODY_NOISE,				LLBodyNoiseMotion::create ); +		registerMotion( ANIM_AGENT_BREATHE_ROT,				LLBreatheMotionRot::create ); +		registerMotion( ANIM_AGENT_EDITING,					LLEditingMotion::create	); +		registerMotion( ANIM_AGENT_EYE,						LLEyeMotion::create	); +		registerMotion( ANIM_AGENT_FEMALE_WALK,				LLKeyframeWalkMotion::create ); +		registerMotion( ANIM_AGENT_FLY_ADJUST,				LLFlyAdjustMotion::create ); +		registerMotion( ANIM_AGENT_HAND_MOTION,				LLHandMotion::create ); +		registerMotion( ANIM_AGENT_HEAD_ROT,				LLHeadRotMotion::create ); +		registerMotion( ANIM_AGENT_PELVIS_FIX,				LLPelvisFixMotion::create ); +		registerMotion( ANIM_AGENT_SIT_FEMALE,				LLKeyframeMotion::create ); +		registerMotion( ANIM_AGENT_TARGET,					LLTargetingMotion::create ); +		registerMotion( ANIM_AGENT_WALK_ADJUST,				LLWalkAdjustMotion::create ); +  	}  	if (gNoRender) @@ -3362,7 +3363,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)  	// the rest should only be done occasionally for far away avatars  	//-------------------------------------------------------------------- -	if (!mIsSelf && sUseImpostors && !mNeedsAnimUpdate && !sFreezeCounter) +	if (!mIsSelf && !mIsDummy && sUseImpostors && !mNeedsAnimUpdate && !sFreezeCounter)  	{  		F32 impostor_area = 256.f*512.f*(8.125f - LLVOAvatar::sLODFactor*8.f);  		if (LLMuteList::getInstance()->isMuted(getID())) @@ -3383,22 +3384,13 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)  		if (!visible)  		{ -			if (!mMotionController.isPaused()) -			{ -				mMotionController.pause(); -				mMotionController.updateMotion(); -				mMotionController.unpause(); -			} -			else -			{			 -				mMotionController.updateMotion(); -			} +			updateMotions(LLCharacter::HIDDEN_UPDATE);  			return FALSE;  		}  	} - +	  	// change animation time quanta based on avatar render load -	if (!mIsSelf) +	if (!mIsSelf && !mIsDummy)  	{  		F32 time_quantum = clamp_rescale((F32)sInstances.size(), 10.f, 35.f, 0.f, 0.25f);  		F32 pixel_area_scale = clamp_rescale(mPixelArea, 100, 5000, 1.f, 0.f); @@ -3672,10 +3664,10 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)  	mSpeed = speed;  	// update animations -	{ -		LLFastTimer t(LLFastTimer::FTM_UPDATE_ANIMATION); -		updateMotion(); -	} +	if (mSpecialRenderMode == 1) // Animation Preview +		updateMotions(LLCharacter::FORCE_UPDATE); +	else +		updateMotions(LLCharacter::NORMAL_UPDATE);  	// update head position  	updateHeadOffset(); @@ -3851,9 +3843,6 @@ void LLVOAvatar::updateVisibility()  	}  	else  	{ -		// calculate avatar distance wrt head -		mDrawable->updateDistance(*LLViewerCamera::getInstance()); -		  		if (!mDrawable->getSpatialGroup() || mDrawable->getSpatialGroup()->isVisible())  		{  			visible = TRUE; @@ -3870,8 +3859,7 @@ void LLVOAvatar::updateVisibility()  				visible = FALSE;  			}  		} -		else -		if( !mFirstAppearanceMessageReceived ) +		else if( !mFirstAppearanceMessageReceived )  		{  			visible = FALSE;  		} @@ -4017,19 +4005,19 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)  		if (mNeedsSkin)  		{  			//generate animated mesh -			mLowerBodyLOD.updateGeometry(); -			mUpperBodyLOD.updateGeometry(); +			mLowerBodyLOD.updateJointGeometry(); +			mUpperBodyLOD.updateJointGeometry();  			if( isWearingWearableType( WT_SKIRT ) )  			{ -				mSkirtLOD.updateGeometry(); +				mSkirtLOD.updateJointGeometry();  			}  			if (!mIsSelf || gAgent.needsRenderHead())  			{ -				mEyeLashLOD.updateGeometry(); -				mHeadLOD.updateGeometry(); -				mHairLOD.updateGeometry();				 +				mEyeLashLOD.updateJointGeometry(); +				mHeadLOD.updateJointGeometry(); +				mHairLOD.updateJointGeometry();				  			}  			mNeedsSkin = FALSE; @@ -5789,6 +5777,7 @@ void LLVOAvatar::setPixelAreaAndAngle(LLAgent &agent)  //-----------------------------------------------------------------------------  BOOL LLVOAvatar::updateJointLODs()  { +	const F32 MAX_PIXEL_AREA = 100000000.f;  	F32 lod_factor = (sLODFactor * AVATAR_LOD_TWEAK_RANGE + (1.f - AVATAR_LOD_TWEAK_RANGE));  	F32 avatar_num_min_factor = clamp_rescale(sLODFactor, 0.f, 1.f, 0.25f, 0.6f);  	F32 avatar_num_factor = clamp_rescale((F32)sNumVisibleAvatars, 8, 25, 1.f, avatar_num_min_factor); @@ -5799,7 +5788,7 @@ BOOL LLVOAvatar::updateJointLODs()  		{  			if(gAgent.cameraCustomizeAvatar() || gAgent.cameraMouselook())  			{ -				mAdjustedPixelArea = 1000000; +				mAdjustedPixelArea = MAX_PIXEL_AREA;  			}  			else  			{ @@ -5808,7 +5797,7 @@ BOOL LLVOAvatar::updateJointLODs()  		}  		else if (mIsDummy)  		{ -			mAdjustedPixelArea = 1000000; +			mAdjustedPixelArea = MAX_PIXEL_AREA;  		}  		else  		{ @@ -6762,7 +6751,7 @@ void LLVOAvatar::dumpTotalLocalTextureByteCount()  BOOL LLVOAvatar::isVisible()  { -	return mDrawable.notNull() && mDrawable->isVisible();  +	return mDrawable.notNull() && (mDrawable->isVisible() || mIsDummy);   } @@ -9724,7 +9713,8 @@ BOOL LLVOAvatar::updateLOD()  		mDrawable->clearState(LLDrawable::REBUILD_GEOMETRY);  	} - +	updateVisibility(); +	  	return res;  } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index b991ae305e..54fd7d370f 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -757,9 +757,9 @@ public:  	//--------------------------------------------------------------------  	F32				mSpeed; -	// +	//--------------------------------------------------------------------  	// Shadow stuff -	// +	//--------------------------------------------------------------------  	LLDrawable*		mShadow;  	BOOL			mInAir;  	LLFrameTimer	mTimeInAir; @@ -1013,7 +1013,7 @@ protected:  	LLHost			getObjectHost() const;  	S32				getLocalDiscardLevel( S32 index); -//Ventrella +  	//-----------------------------------------------------------------------------------------------  	// the Voice Visualizer is responsible for detecting the user's voice signal, and when the  	// user speaks, it puts a voice symbol over the avatar's head, and triggering gesticulations @@ -1021,7 +1021,6 @@ protected:  	private:  	LLVoiceVisualizer * mVoiceVisualizer;  	int					mCurrentGesticulationLevel; -//End Ventrella  private:  	static  S32 sFreezeCounter ; diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index 85a1674d98..f864b75bec 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -31,8 +31,6 @@  #ifndef LL_VOICE_CLIENT_H  #define LL_VOICE_CLIENT_H -// This would create a circular reference -- just do a forward definition of necessary class names. -//#include "llvoavatar.h"  class LLVOAvatar;  class LLVivoxProtocolParser; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 16c6bcdd5f..b84f8d8e4b 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1952,7 +1952,6 @@ LLVolumePartition::LLVolumePartition()  	mPartitionType = LLViewerRegion::PARTITION_VOLUME;  	mSlopRatio = 0.25f;  	mBufferUsage = GL_DYNAMIC_DRAW_ARB; -	mImageEnabled = TRUE;  }  LLVolumeBridge::LLVolumeBridge(LLDrawable* drawablep) @@ -2045,7 +2044,6 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,  		draw_info->mGroup = group;  		draw_info->mVSize = facep->getVirtualSize();  		draw_vec.push_back(draw_info); -		draw_info->mReflectionMap = group->mReflectionMap;  		draw_info->mTextureMatrix = tex_mat;  		draw_info->mModelMatrix = model_mat;  		draw_info->mGlowColor.setVec(0,0,0,glow); @@ -2163,20 +2161,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)  	LLFastTimer ftm2(LLFastTimer::FTM_REBUILD_VOLUME_VB); -	//find reflection map -	if (group->mSpatialPartition->mImageEnabled && LLPipeline::sDynamicReflections) -	{ -		if (group->mReflectionMap.isNull()) -		{ -			LLSpatialGroup* parent = group->getParent(); -			while (parent && group->mReflectionMap.isNull()) -			{ -				group->mReflectionMap = parent->mReflectionMap; -				parent = parent->getParent(); -			} -		} -	} -  	group->clearDrawMap();  	mFaceList.clear(); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 539379c9a1..3679b57da8 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -217,7 +217,6 @@ BOOL	LLPipeline::sDisableShaders = FALSE;  BOOL	LLPipeline::sRenderBump = TRUE;  BOOL	LLPipeline::sUseFarClip = TRUE;  BOOL	LLPipeline::sSkipUpdate = FALSE; -BOOL	LLPipeline::sDynamicReflections = FALSE;  BOOL	LLPipeline::sWaterReflections = FALSE;  BOOL	LLPipeline::sRenderGlow = FALSE;  BOOL	LLPipeline::sReflectionRender = FALSE; @@ -474,15 +473,14 @@ void LLPipeline::createGLBuffers()  {  	assertInitialized(); -	if (LLPipeline::sDynamicReflections || -		LLPipeline::sWaterReflections) +	if (LLPipeline::sWaterReflections)  	{ //water reflection texture  		U32 res = (U32) gSavedSettings.getS32("RenderWaterRefResolution");  		mWaterRef.allocate(res,res,GL_RGBA,TRUE);  		mWaterDis.allocate(res,res,GL_RGBA,TRUE); -		if (LLPipeline::sDynamicReflections) +#if 0 //cube map buffers (keep for future work)  		{  			//reflection map generation buffers  			if (mCubeFrameBuffer == 0) @@ -538,8 +536,10 @@ void LLPipeline::createGLBuffers()  				}  			}  		} +#endif  	} +  	stop_glerror();  	if (LLPipeline::sRenderGlow) @@ -910,6 +910,15 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)  	}  	mLights.erase(drawablep); +	for (light_set_t::iterator iter = mNearbyLights.begin(); +				iter != mNearbyLights.end(); iter++) +	{ +		if (iter->drawable == drawablep) +		{ +			mNearbyLights.erase(iter); +			break; +		} +	}  }  U32 LLPipeline::addObject(LLViewerObject *vobj) @@ -1777,17 +1786,16 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)  	LLSpatialGroup* group = drawablep->getSpatialGroup();  	if (!group || group->changeLOD())  	{ -		if (!drawablep->isActive() && drawablep->isVisible()) +		if (drawablep->isVisible() && !sSkipUpdate)  		{ -			if (!sSkipUpdate) +			if (!drawablep->isActive())  			{  				drawablep->updateDistance(camera);  			} -		} -		else if (drawablep->isAvatar() && drawablep->isVisible()) -		{ -			LLVOAvatar* vobj = (LLVOAvatar*) drawablep->getVObj().get(); -			vobj->updateVisibility(); +			else if (drawablep->isAvatar()) +			{ +				drawablep->updateDistance(camera); // calls vobj->updateLOD() which calls LLVOAvatar::updateVisibility() +			}  		}  	} @@ -3147,6 +3155,11 @@ void LLPipeline::calcNearbyLights(LLCamera& camera)  {  	assertInitialized(); +	if (LLPipeline::sReflectionRender) +	{ +		return; +	} +  	if (mLightingDetail >= 1)  	{  		// mNearbyLight (and all light_set_t's) are sorted such that @@ -4801,21 +4814,6 @@ void LLPipeline::renderBloom(BOOL for_snapshot)  } -void LLPipeline::processImagery(LLCamera& camera) -{ -	for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin();  -			iter != LLWorld::getInstance()->getRegionList().end(); ++iter) -	{ -		LLViewerRegion* region = *iter; -		LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_VOLUME); -		if (part) -		{ -			part->processImagery(&camera);	 -		} -	} -} - -  inline float sgn(float a)  {      if (a > 0.0F) return (1.0F); @@ -5026,26 +5024,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)  	}  } -LLCubeMap* LLPipeline::findReflectionMap(const LLVector3& location) -{ -	LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosAgent(location); -	if (region) -	{ -		LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_VOLUME); -		if (part) -		{ -			LLSpatialGroup::OctreeNode* node = part->mOctree->getNodeAt(LLVector3d(location), 32.0); -			if (node) -			{ -				LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0); -				return group->mReflectionMap; -			} -		} -	} - -	return NULL; -} -  void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture)  {  	for (LLCullResult::sg_list_t::iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i) diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index a96fe0865d..e98be79120 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -96,8 +96,6 @@ public:  	void bindScreenToTexture();  	void renderBloom(BOOL for_snapshot); -	LLCubeMap* findReflectionMap(const LLVector3& location); -  	void init();  	void cleanup();  	BOOL isInit() { return mInitialized; }; @@ -183,7 +181,6 @@ public:  	void renderGeom(LLCamera& camera, BOOL forceVBOUpdate = FALSE);  	void renderGeomDeferred(); -	void processImagery(LLCamera& camera);  	void generateWaterReflection(LLCamera& camera);  	void renderHighlights();  	void renderDebug(); @@ -371,7 +368,6 @@ public:  	static BOOL				sUseFBO;  	static BOOL				sUseFarClip;  	static BOOL				sSkipUpdate; //skip lod updates -	static BOOL				sDynamicReflections;  	static BOOL				sWaterReflections;  	static BOOL				sDynamicLOD;  	static BOOL				sReflectionRender; | 
