diff options
| author | Steven Bennetts <steve@lindenlab.com> | 2008-05-09 20:57:23 +0000 | 
|---|---|---|
| committer | Steven Bennetts <steve@lindenlab.com> | 2008-05-09 20:57:23 +0000 | 
| commit | 783e05058c5d74984ab554fdc60aa06839b9b5c9 (patch) | |
| tree | b40ca6762c7546b65db3966c04ef545a23643f21 | |
| parent | dbe0176552e070baef9a693252cb47dda97d1fb4 (diff) | |
QAR-537 Viewer 1.20 RC 6
merge -r 86279:86925 Branch_1-20-Viewer -> release
25 files changed, 238 insertions, 96 deletions
| diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index 9b4d4ff0a2..d4bbef7e13 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -34,7 +34,7 @@  const S32 LL_VERSION_MAJOR = 1;  const S32 LL_VERSION_MINOR = 20; -const S32 LL_VERSION_PATCH = 5; +const S32 LL_VERSION_PATCH = 6;  const S32 LL_VERSION_BUILD = 0;  const char * const LL_CHANNEL = "Second Life Release"; diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index a7bfe64f92..55fa48f437 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -1044,8 +1044,8 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre  	S32 gl_discard = discard_level - mCurrentDiscardLevel; -	llverify(bindTextureInternal(0)); -	 +	llverify(bindTextureInternal(0));	 +  	LLGLint glwidth = 0;  	glGetTexLevelParameteriv(mTarget, gl_discard, GL_TEXTURE_WIDTH, (GLint*)&glwidth);  	if (glwidth == 0) @@ -1067,40 +1067,63 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre  		llerrs << llformat("LLImageGL::readBackRaw: bogus params: %d x %d x %d",width,height,ncomponents) << llendl;  	} -	BOOL return_result = TRUE ;  	LLGLint is_compressed = 0;  	if (compressed_ok)  	{  		glGetTexLevelParameteriv(mTarget, is_compressed, GL_TEXTURE_COMPRESSED, (GLint*)&is_compressed);  	} +	 +	//----------------------------------------------------------------------------------------------- +	GLenum error ; +	while((error = glGetError()) != GL_NO_ERROR) +	{ +		llwarns << "GL Error happens before reading back texture. Error code: " << error << llendl ; +	} +	//----------------------------------------------------------------------------------------------- +  	if (is_compressed)  	{  		LLGLint glbytes;  		glGetTexLevelParameteriv(mTarget, gl_discard, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, (GLint*)&glbytes); -		imageraw->allocateDataSize(width, height, ncomponents, glbytes); -		glGetCompressedTexImageARB(mTarget, gl_discard, (GLvoid*)(imageraw->getData())); -		if(glGetError() != GL_NO_ERROR) +		if(!imageraw->allocateDataSize(width, height, ncomponents, glbytes))  		{ -			llwarns << "Error happens when reading back the compressed texture image." << llendl ; -			imageraw->deleteData() ; -			return_result = FALSE ; +			llwarns << "Memory allocation failed for reading back texture. Size is: " << glbytes << llendl ; +			llwarns << "width: " << width << "height: " << height << "components: " << ncomponents << llendl ; +			return FALSE ;  		} -		stop_glerror(); + +		glGetCompressedTexImageARB(mTarget, gl_discard, (GLvoid*)(imageraw->getData()));		 +		//stop_glerror();  	}  	else  	{ -		imageraw->allocateDataSize(width, height, ncomponents); -		glGetTexImage(GL_TEXTURE_2D, gl_discard, mFormatPrimary, mFormatType, (GLvoid*)(imageraw->getData())); -		if(glGetError() != GL_NO_ERROR) +		if(!imageraw->allocateDataSize(width, height, ncomponents))  		{ -			llwarns << "Error happens when reading back the texture image." << llendl ; -			imageraw->deleteData() ; -			return_result = FALSE ; +			llwarns << "Memory allocation failed for reading back texture." << llendl ; +			llwarns << "width: " << width << "height: " << height << "components: " << ncomponents << llendl ; +			return FALSE ;  		} -		stop_glerror(); +		 +		glGetTexImage(GL_TEXTURE_2D, gl_discard, mFormatPrimary, mFormatType, (GLvoid*)(imageraw->getData()));		 +		//stop_glerror();  	} -	return return_result ; +	//----------------------------------------------------------------------------------------------- +	if((error = glGetError()) != GL_NO_ERROR) +	{ +		llwarns << "GL Error happens after reading back texture. Error code: " << error << llendl ; +		imageraw->deleteData() ; + +		while((error = glGetError()) != GL_NO_ERROR) +		{ +			llwarns << "GL Error happens after reading back texture. Error code: " << error << llendl ; +		} + +		return FALSE ; +	} +	//----------------------------------------------------------------------------------------------- +	 +	return TRUE ;  }  void LLImageGL::destroyGLTexture() diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 5a1079ac15..2f053a6493 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -232,7 +232,7 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const  		llerrs << "Bad vertex buffer draw range: [" << first << ", " << first+count << "]" << llendl;  	} -	if (mGLBuffer != sGLRenderBuffer) +	if (mGLBuffer != sGLRenderBuffer || useVBOs() != sVBOActive)  	{  		llerrs << "Wrong vertex buffer bound." << llendl;  	} diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 4e640eac2a..05888fe382 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1117,9 +1117,7 @@ BOOL LLScrollListCtrl::selectItemRange( S32 first_index, S32 last_index )  			if( itemp->getEnabled() )  			{  				selectItem(itemp, FALSE); -				success = TRUE; -				if (!success) -					mOriginalSelection = first_index; +				success = TRUE;				  			}  		}  		else @@ -1198,7 +1196,7 @@ void LLScrollListCtrl::deleteItems(const LLSD& sd)  				mLastSelected = NULL;  			}  			delete itemp; -			mItemList.erase(iter++); +			iter = mItemList.erase(iter);  		}  		else  		{ diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index a39b74a610..36b84c741f 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -249,6 +249,18 @@ void LLSpinCtrl::setValue(const LLSD& value )  	}  } +//no matter if Editor has the focus, update the value +void LLSpinCtrl::forceSetValue(const LLSD& value ) +{ +	F32 v = (F32)value.asReal(); +	if (mValue != v || !mbHasBeenSet) +	{ +		mbHasBeenSet = TRUE; +		mValue = v; +		 +		updateEditor(); +	} +}  void LLSpinCtrl::clear()  { diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h index 21d297fa16..eb9c60d442 100644 --- a/indra/llui/llspinctrl.h +++ b/indra/llui/llspinctrl.h @@ -66,6 +66,7 @@ public:  	virtual LLXMLNodePtr getXML(bool save_children = true) const;  	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory); +	virtual void    forceSetValue(const LLSD& value ) ;  	virtual void	setValue(const LLSD& value );  	virtual LLSD	getValue() const { return mValue; }  			F32		get() const { return (F32)getValue().asReal(); } @@ -87,6 +88,7 @@ public:  	virtual void	setIncrement(F32 inc)			{ mIncrement = inc; }  	virtual F32		getMinValue()			{ return mMinValue ; }  	virtual F32 	getMaxValue()			{ return mMaxValue ; } +	virtual F32     getIncrement()          { return mIncrement ; }  	void			setLabel(const LLStringExplicit& label);  	void			setLabelColor(const LLColor4& c)			{ mTextEnabledColor = c; } diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index c75c6714f8..c2dc9a1e90 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -104,10 +104,17 @@ static LLRegisterWidget<LLUICtrlLocate> r2("pad");  // LLUICtrlFactory()  //-----------------------------------------------------------------------------  LLUICtrlFactory::LLUICtrlFactory() +	: mDummyPanel(NULL)  {  	setupPaths();  } +LLUICtrlFactory::~LLUICtrlFactory() +{ +	delete mDummyPanel; +	mDummyPanel = NULL; +} +  void LLUICtrlFactory::setupPaths()  {  	LLString filename = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, "paths.xml"); @@ -428,10 +435,6 @@ void LLUICtrlFactory::rebuild()  LLView *LLUICtrlFactory::createCtrlWidget(LLPanel *parent, LLXMLNodePtr node)  { -	// panel for holding dummy widgets, so they have a parent for layout purposes, etc. -	// does not manage lifetime of child widgets -	static LLPanel dummy_panel; -  	LLString ctrl_type = node->getName()->mString;  	LLString::toLower(ctrl_type); @@ -445,7 +448,11 @@ LLView *LLUICtrlFactory::createCtrlWidget(LLPanel *parent, LLXMLNodePtr node)  	if (parent == NULL)  	{ -		parent = &dummy_panel; +		if (mDummyPanel == NULL) +		{ +			mDummyPanel = new LLPanel; +		} +		parent = mDummyPanel;  	}  	LLView *ctrl = func(node, parent, this); diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index 651bfa7b88..cd4fa8cacf 100644 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -46,7 +46,7 @@ class LLUICtrlFactory : public LLSingleton<LLUICtrlFactory>  public:  	LLUICtrlFactory();  	// do not call!  needs to be public so run-time can clean up the singleton -	virtual ~LLUICtrlFactory() {} +	virtual ~LLUICtrlFactory();  	void setupPaths(); @@ -88,6 +88,8 @@ private:  	std::deque<const LLCallbackMap::map_t*> mFactoryStack;  	static std::vector<LLString> mXUIPaths; + +	LLPanel* mDummyPanel;  }; diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 773e71a369..2d391c4416 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2840,7 +2840,7 @@          <key>Comment</key>              <string>Whether or not a joystick has been detected and initiailized.</string>          <key>Persist</key> -            <integer>0</integer> +            <integer>1</integer>          <key>Type</key>              <string>String</string>          <key>Value</key> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1ad37f239c..b8adfe5477 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -875,15 +875,7 @@ bool LLAppViewer::init()  	gSimFrames = (F32)gFrameCount;  	LLViewerJoystick::getInstance()->init(false); -	if (LLViewerJoystick::getInstance()->isLikeSpaceNavigator()) -	{ -		if (gSavedSettings.getString("JoystickInitialized") != "SpaceNavigator") -		{ -			LLFloaterJoystick::setSNDefaults(); -			gSavedSettings.setString("JoystickInitialized", "SpaceNavigator"); -		} -	} -	 +  	return true;  } diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index 4747043c78..c60ddbc517 100644 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -357,7 +357,7 @@ void LLDrawPoolTerrain::renderFullShader()  void LLDrawPoolTerrain::renderFull4TU()  { -		glEnableClientState(GL_VERTEX_ARRAY); +	glEnableClientState(GL_VERTEX_ARRAY);  	glEnableClientState(GL_NORMAL_ARRAY);  	// Hack! Get the region that this draw pool is rendering from! @@ -388,8 +388,7 @@ void LLDrawPoolTerrain::renderFull4TU()  	glActiveTextureARB(GL_TEXTURE0_ARB);  	LLViewerImage::bindTexture(detail_texture0p,0);  	glClientActiveTextureARB(GL_TEXTURE0_ARB); - -	glDisableClientState(GL_TEXTURE_COORD_ARRAY); +	  	glEnable(GL_TEXTURE_GEN_S);  	glEnable(GL_TEXTURE_GEN_T);  	glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); @@ -467,6 +466,8 @@ void LLDrawPoolTerrain::renderFull4TU()  	glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_ARB,		GL_SRC_COLOR);  	glActiveTextureARB(GL_TEXTURE0_ARB); +	glClientActiveTextureARB(GL_TEXTURE0_ARB); +  	// GL_BLEND disabled by default  	drawLoop(); @@ -576,11 +577,13 @@ void LLDrawPoolTerrain::renderFull4TU()  	glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB,	GL_SRC_ALPHA);  	glActiveTextureARB(GL_TEXTURE0_ARB); +	glClientActiveTextureARB(GL_TEXTURE0_ARB);  	{  		LLGLEnable blend(GL_BLEND);  		drawLoop();  	} +	LLVertexBuffer::unbind();  	// Disable multitexture  	LLImageGL::unbindTexture(3, GL_TEXTURE_2D);  	glActiveTextureARB(GL_TEXTURE3_ARB); diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp index 26ed03951c..d67ae2de2d 100644 --- a/indra/newview/llfloatergroups.cpp +++ b/indra/newview/llfloatergroups.cpp @@ -466,7 +466,7 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 pow  		LLSD element;  		element["id"] = LLUUID::null;  		element["columns"][0]["column"] = "name"; -		element["columns"][0]["value"] = "none"; +		element["columns"][0]["value"] = "none"; // *TODO: Translate  		element["columns"][0]["font"] = "SANSSERIF";  		element["columns"][0]["font-style"] = style; diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index bea12fe017..74a880e010 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -65,11 +65,21 @@  // helper class to watch the inventory.   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLPropertiesObserver : public LLInventoryObserver, public LLSingleton<LLPropertiesObserver> +// Ugh. This can't be a singleton because it needs to remove itself +//  from the inventory observer list when destroyed, which could +//  happen after gInventory has already been destroyed if a singleton. +// Instead, do our own ref counting and create / destroy it as needed +class LLPropertiesObserver : public LLInventoryObserver  {  public: -	LLPropertiesObserver() {} -	virtual ~LLPropertiesObserver() {} +	LLPropertiesObserver() +	{ +		gInventory.addObserver(this); +	} +	virtual ~LLPropertiesObserver() +	{ +		gInventory.removeObserver(this); +	}  	virtual void changed(U32 mask);  }; @@ -88,7 +98,10 @@ void LLPropertiesObserver::changed(U32 mask)  /// Class LLFloaterProperties  ///---------------------------------------------------------------------------- +// static  LLFloaterProperties::instance_map LLFloaterProperties::sInstances; +LLPropertiesObserver* LLFloaterProperties::sPropertiesObserver = NULL; +S32 LLFloaterProperties::sPropertiesObserverCount = 0;  // static  LLFloaterProperties* LLFloaterProperties::find(const LLUUID& item_id, @@ -145,12 +158,12 @@ LLFloaterProperties::LLFloaterProperties(const std::string& name, const LLRect&  {  	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_inventory_item_properties.xml"); -	// hack to make sure these floaters are observing the inventory. -	if(!gInventory.containsObserver(LLPropertiesObserver::getInstance())) +	if (!sPropertiesObserver)  	{ -		// Note: this is where gPropertiesObserver used to be constructed. -		gInventory.addObserver(LLPropertiesObserver::getInstance()); +		sPropertiesObserver = new LLPropertiesObserver;  	} +	sPropertiesObserverCount++; +	  	// add the object to the static structure  	LLUUID key = mItemID ^ mObjectID;  	sInstances.insert(instance_map::value_type(key, this)); @@ -193,6 +206,12 @@ LLFloaterProperties::~LLFloaterProperties()  	{  		sInstances.erase(it);  	} +	sPropertiesObserverCount--; +	if (!sPropertiesObserverCount) +	{ +		delete sPropertiesObserver; +		sPropertiesObserver = NULL; +	}  }  void LLFloaterProperties::refresh() diff --git a/indra/newview/llfloaterproperties.h b/indra/newview/llfloaterproperties.h index 7b1cb5d77c..8f96bf7078 100644 --- a/indra/newview/llfloaterproperties.h +++ b/indra/newview/llfloaterproperties.h @@ -47,6 +47,8 @@ class LLLineEditor;  class LLRadioGroup;  class LLTextBox; +class LLPropertiesObserver; +  class LLFloaterProperties : public LLFloater  {  public: @@ -94,6 +96,8 @@ protected:  	typedef std::map<LLUUID, LLFloaterProperties*, lluuid_less> instance_map;  	static instance_map sInstances; +	static LLPropertiesObserver* sPropertiesObserver; +	static S32 sPropertiesObserverCount;  };  class LLMultiProperties : public LLMultiFloater diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 7950b127f0..b2301808a1 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1694,13 +1694,13 @@ void LLFloaterSnapshot::Impl::resetSnapshotSizeOnUI(LLFloaterSnapshot *view, S32  	LLSpinCtrl *sctrl = view->getChild<LLSpinCtrl>("snapshot_width") ;  	if(sctrl)  	{ -		sctrl->setValue(width) ; +		sctrl->forceSetValue(width) ;  	}  	sctrl = view->getChild<LLSpinCtrl>("snapshot_height") ;  	if(sctrl)  	{ -		sctrl->setValue(height) ; +		sctrl->forceSetValue(height) ;  	}  	gSavedSettings.setS32("LastSnapshotWidth", width); @@ -1727,8 +1727,30 @@ void LLFloaterSnapshot::Impl::onCommitCustomResolution(LLUICtrl *ctrl, void* dat  			if (w != curw || h != curh)  			{ +				BOOL update_ = FALSE ; +				//if to upload a snapshot, process spinner input in a special way. +				if(LLSnapshotLivePreview::SNAPSHOT_TEXTURE == gSavedSettings.getS32("LastSnapshotType")) +				{ +					S32 spinner_increment = (S32)((LLSpinCtrl*)ctrl)->getIncrement() ; +					S32 dw = w - curw ; +					S32 dh = h - curh ; +					dw = (dw == spinner_increment) ? 1 : ((dw == -spinner_increment) ? -1 : 0) ; +					dh = (dh == spinner_increment) ? 1 : ((dh == -spinner_increment) ? -1 : 0) ; + +					if(dw) +					{ +						w = (dw > 0) ? curw << dw : curw >> -dw ; +						update_ = TRUE ; +					} +					if(dh) +					{ +						h = (dh > 0) ? curh << dh : curh >> -dh ; +						update_ = TRUE ; +					} +				} +  				previewp->setMaxImageSize((S32)((LLSpinCtrl *)ctrl)->getMaxValue()) ; -				if(checkImageSize(previewp, w, h, w != curw, previewp->getMaxImageSize())) +				if(checkImageSize(previewp, w, h, w != curw, previewp->getMaxImageSize()) || update_)  				{  					resetSnapshotSizeOnUI(view, w, h) ;  				} diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index 07b0379f7a..136974df2e 100644 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -282,7 +282,6 @@ void LLHUDObject::renderAll()  		}  	} -	// cleanup any leftover client state, etc  	LLVertexBuffer::unbind();  } diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp index c109ca10a0..1717153810 100644 --- a/indra/newview/llviewerjoystick.cpp +++ b/indra/newview/llviewerjoystick.cpp @@ -228,8 +228,38 @@ void LLViewerJoystick::init(bool autoenable)  			mDriverState = JDS_UNINITIALIZED;  		}  	} + +	// Autoenable the joystick for recognized devices if nothing was connected previously +	if (!autoenable) +	{ +		autoenable = gSavedSettings.getString("JoystickInitialized").empty() ? true : false; +	}  	updateEnabled(autoenable); +	if (mDriverState == JDS_INITIALIZED) +	{ +		// A Joystick device is plugged in +		if (isLikeSpaceNavigator()) +		{ +			// It's a space navigator, we have defaults for it. +			if (gSavedSettings.getString("JoystickInitialized") != "SpaceNavigator") +			{ +				// Only set the defaults if we haven't already (in case they were overridden) +				setSNDefaults(); +				gSavedSettings.setString("JoystickInitialized", "SpaceNavigator"); +			} +		} +		else +		{ +			// It's not a Space Navigator +			gSavedSettings.setString("JoystickInitialized", "UnknownDevice"); +		} +	} +	else +	{ +		// No device connected, don't change any settings +	} +	  	llinfos << "ndof: mDriverState=" << mDriverState << "; mNdofDev="   			<< mNdofDev << "; libinit=" << libinit << llendl;  #endif diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index e32564faa6..c4cd7a3a3d 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1064,7 +1064,7 @@ void init_client_menu(LLMenuGL* menu)  	menu->appendSeparator();  -	menu->append(new LLMenuItemCallGL("Compress Image...",  +	menu->append(new LLMenuItemCallGL("Compress Images...",   		&handle_compress_image, NULL, NULL));  	menu->append(new LLMenuItemCheckGL("Limit Select Distance",  @@ -1507,7 +1507,8 @@ void init_debug_avatar_menu(LLMenuGL* menu)  	menu->append(new LLMenuItemToggleGL("Disable LOD", &LLViewerJoint::sDisableLOD));  	menu->append(new LLMenuItemToggleGL("Debug Character Vis", &LLVOAvatar::sDebugInvisible));  	//menu->append(new LLMenuItemToggleGL("Show Attachment Points", &LLVOAvatar::sShowAttachmentPoints)); -	menu->append(new LLMenuItemToggleGL("Show Collision Plane", &LLVOAvatar::sShowFootPlane)); +	//diabling collision plane due to DEV-14477 -brad +	//menu->append(new LLMenuItemToggleGL("Show Collision Plane", &LLVOAvatar::sShowFootPlane));  	menu->append(new LLMenuItemToggleGL("Show Collision Skeleton", &LLVOAvatar::sShowCollisionVolumes));  	menu->append(new LLMenuItemToggleGL( "Display Agent Target", &LLAgent::sDebugDisplayTarget));  	menu->append(new LLMenuItemToggleGL( "Debug Rotation", &gDebugAvatarRotation)); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 864c1dd570..9dc3208adb 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -436,25 +436,31 @@ void handle_upload(void* data)  void handle_compress_image(void*)  {  	LLFilePicker& picker = LLFilePicker::instance(); -	if (picker.getOpenFile(LLFilePicker::FFLOAD_IMAGE)) +	if (picker.getMultipleOpenFiles(LLFilePicker::FFLOAD_IMAGE))  	{ -		std::string infile(picker.getFirstFile()); -		std::string outfile = infile + ".j2c"; +		const char* input_file = picker.getFirstFile(); +		while (input_file) +		{ +			std::string infile(input_file); +			std::string outfile = infile + ".j2c"; -		llinfos << "Input:  " << infile << llendl; -		llinfos << "Output: " << outfile << llendl; +			llinfos << "Input:  " << infile << llendl; +			llinfos << "Output: " << outfile << llendl; -		BOOL success; +			BOOL success; -		success = LLViewerImageList::createUploadFile(infile, outfile, IMG_CODEC_TGA); +			success = LLViewerImageList::createUploadFile(infile, outfile, IMG_CODEC_TGA); -		if (success) -		{ -			llinfos << "Compression complete" << llendl; -		} -		else -		{ -			llinfos << "Compression failed: " << LLImageBase::getLastError() << llendl; +			if (success) +			{ +				llinfos << "Compression complete" << llendl; +			} +			else +			{ +				llinfos << "Compression failed: " << LLImageBase::getLastError() << llendl; +			} + +			input_file = picker.getNextFile();  		}  	}  } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 577e76b957..3b2b82e1f9 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1823,7 +1823,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)  		}  		break;  	case IM_BUSY_AUTO_RESPONSE: -		// fix for JIRA issue VWR-20 submitted 13-JAN-2007 - Paul Churchill  		if (is_muted)  		{  			lldebugs << "Ignoring busy response from " << from_id << llendl; @@ -1831,8 +1830,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)  		}  		else  		{ -			// original code resumes -			gIMMgr->addMessage(session_id, from_id, name, message); +			// TODO: after LLTrans hits release, get "busy response" into translatable file +			snprintf(buffer, sizeof(buffer), "%s (%s): %s", name, "busy response", (message+message_offset)); /* Flawfinder: ignore */ +			gIMMgr->addMessage(session_id, from_id, name, buffer);  		}  		break; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 8398c3c9d7..b902599e88 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1212,6 +1212,7 @@ U32 LLViewerObjectList::renderObjectsForSelect(LLCamera &camera, BOOL pick_parce  	// render pickable ui elements, like names, etc.  	LLHUDObject::renderAllForSelect();  	gGL.flush(); +	LLVertexBuffer::unbind();  	gRenderForSelect = FALSE; diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 2b475ce9f9..0259d4896c 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -103,6 +103,12 @@ void LLViewerParcelMedia::update(LLParcel* parcel)  			// we're in a parcel  			bool new_parcel = false;  			S32 parcelid = parcel->getLocalID(); +			 +			if(!gAgent.getRegion()) +			{ +				llerrs << "gAgent's region is NULL." << llendl ;				 +			} +  			LLUUID regionid = gAgent.getRegion()->getRegionID();  			if (parcelid != sMediaParcelLocalID || regionid != sMediaRegionID)  			{ diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp index d190d2f12c..342d8c7222 100644 --- a/indra/newview/llviewerparceloverlay.cpp +++ b/indra/newview/llviewerparceloverlay.cpp @@ -48,6 +48,8 @@  #include "llagent.h"  #include "llviewercamera.h"  #include "llviewerimagelist.h" +#include "llselectmgr.h" +#include "llfloatertools.h"  #include "llglheaders.h"  const U8  OVERLAY_IMG_COMPONENTS = 4; @@ -839,31 +841,34 @@ S32 LLViewerParcelOverlay::renderPropertyLines	()  		gGL.end(); -		LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_GREATER); -		 -		colorp  = mColorArray  + BYTES_PER_COLOR   * i; -		vertexp = mVertexArray + FLOATS_PER_VERTEX * i; +		if (LLSelectMgr::sRenderHiddenSelections && gFloaterTools && gFloaterTools->getVisible()) +		{ +			LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_GREATER); +			 +			colorp  = mColorArray  + BYTES_PER_COLOR   * i; +			vertexp = mVertexArray + FLOATS_PER_VERTEX * i; -		gGL.begin(LLVertexBuffer::TRIANGLE_STRIP); +			gGL.begin(LLVertexBuffer::TRIANGLE_STRIP); -		for (j = 0; j < vertex_per_edge; j++) -		{ -			U8 color[4]; -			color[0] = colorp[0]; -			color[1] = colorp[1]; -			color[2] = colorp[2]; -			color[3] = colorp[3]/4; +			for (j = 0; j < vertex_per_edge; j++) +			{ +				U8 color[4]; +				color[0] = colorp[0]; +				color[1] = colorp[1]; +				color[2] = colorp[2]; +				color[3] = colorp[3]/4; -			gGL.color4ubv(color); -			gGL.vertex3fv(vertexp); +				gGL.color4ubv(color); +				gGL.vertex3fv(vertexp); -			colorp  += BYTES_PER_COLOR; -			vertexp += FLOATS_PER_VERTEX;			 -		} +				colorp  += BYTES_PER_COLOR; +				vertexp += FLOATS_PER_VERTEX;			 +			} -		drawn += vertex_per_edge; +			drawn += vertex_per_edge; -		gGL.end(); +			gGL.end(); +		}  	} diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 292fa83918..d7dfd8ac4a 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4048,7 +4048,10 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)  	}  	// render collision normal -	if (sShowFootPlane && mDrawable.notNull()) +	// *NOTE: this is disabled (there is no UI for enabling sShowFootPlane) due +	// to DEV-14477.  the code is left here to aid in tracking down the cause +	// of the crash in the future. -brad +	if (!gRenderForSelect && sShowFootPlane && mDrawable.notNull())  	{  		LLVector3 slaved_pos = mDrawable->getPositionAgent();  		LLVector3 foot_plane_normal(mFootPlane.mV[VX], mFootPlane.mV[VY], mFootPlane.mV[VZ]); @@ -4076,7 +4079,9 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)  			gGL.vertex3f(collide_point.mV[VX], collide_point.mV[VY], collide_point.mV[VZ]);  			gGL.vertex3f(collide_point.mV[VX] + mFootPlane.mV[VX], collide_point.mV[VY] + mFootPlane.mV[VY], collide_point.mV[VZ] + mFootPlane.mV[VZ]); -		}gGL.end(); +		} +		gGL.end(); +		gGL.flush();  	}  	//--------------------------------------------------------------------  	// render all geomety attached to the skeleton diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 4972ce33ea..18b99d8b74 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1643,6 +1643,8 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)  	LLFastTimer ftm(LLFastTimer::FTM_STATESORT);  	LLMemType mt(LLMemType::MTYPE_PIPELINE); +	//LLVertexBuffer::unbind(); +  	grabReferences(result);  	{ @@ -2466,6 +2468,8 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)  		}  	} +	LLVertexBuffer::unbind(); +  	LLGLState::checkStates();  	LLGLState::checkTextureChannels();  	LLGLState::checkClientArrays(); @@ -4759,7 +4763,6 @@ void LLPipeline::renderBloom(BOOL for_snapshot)  		LLGLDisable blend(GL_BLEND); -  		//tex unit 0  		glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB);  		glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); @@ -4806,6 +4809,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot)  	glMatrixMode(GL_MODELVIEW);  	glPopMatrix(); +	LLVertexBuffer::unbind(); +  	LLGLState::checkStates();  	LLGLState::checkTextureChannels(); | 
