diff options
| author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-01-13 13:38:24 +0200 | 
|---|---|---|
| committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-01-13 13:38:24 +0200 | 
| commit | e6c2b2b87cd8b90116a3eb7bfb01b3efce6d6ba2 (patch) | |
| tree | 89d21fc719352fd6ebd5987ae77e63f208d0542e | |
| parent | a619f9c307a46d709061c6e1d8179e699964688d (diff) | |
| parent | abc190525fd047b22f2e50b22a9fcd4d05f45e83 (diff) | |
Merge from default branch.
--HG--
branch : product-engine
| -rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 42 | ||||
| -rw-r--r-- | indra/newview/lldrawpoolwlsky.cpp | 21 | ||||
| -rw-r--r-- | indra/newview/lldrawpoolwlsky.h | 2 | ||||
| -rw-r--r-- | indra/newview/llsidetray.cpp | 15 | ||||
| -rw-r--r-- | indra/newview/llvoavatar.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llvowlsky.cpp | 41 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_buy_currency.xml | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_lsl_guide.xml | 4 | ||||
| -rw-r--r-- | indra/viewer_components/login/lllogin.cpp | 16 | ||||
| -rw-r--r-- | indra/viewer_components/login/tests/lllogin_test.cpp | 12 | 
10 files changed, 95 insertions, 61 deletions
| diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index db4189dfea..572ae13909 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -1061,17 +1061,20 @@ void LLVertexBuffer::setBuffer(U32 data_mask)  				}  			} -			glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); -			if ((GLuint)buff != mGLIndices) +			if (mGLIndices)  			{ -				if (gDebugSession) -				{ -					error = TRUE; -					gFailLog << "Invalid GL index buffer bound: " << buff <<  std::endl; -				} -				else +				glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); +				if ((GLuint)buff != mGLIndices)  				{ -					llerrs << "Invalid GL index buffer bound: " << buff << llendl; +					if (gDebugSession) +					{ +						error = TRUE; +						gFailLog << "Invalid GL index buffer bound: " << buff <<  std::endl; +					} +					else +					{ +						llerrs << "Invalid GL index buffer bound: " << buff << llendl; +					}  				}  			}  		} @@ -1095,17 +1098,20 @@ void LLVertexBuffer::setBuffer(U32 data_mask)  					}  				} -				glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); -				if ((GLuint)buff != mGLIndices) +				if (mGLIndices != 0)  				{ -					if (gDebugSession) -					{ -						error = TRUE; -						gFailLog << "Invalid GL index buffer bound: "<< std::endl; -					} -					else +					glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); +					if ((GLuint)buff != mGLIndices)  					{ -						llerrs << "Invalid GL index buffer bound: " << buff << llendl; +						if (gDebugSession) +						{ +							error = TRUE; +							gFailLog << "Invalid GL index buffer bound: "<< std::endl; +						} +						else +						{ +							llerrs << "Invalid GL index buffer bound: " << buff << llendl; +						}  					}  				}  			} diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index c14ca2473b..c7cd77cb65 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -159,15 +159,10 @@ void LLDrawPoolWLSky::renderStars(void) const  	// *NOTE: have to have bound the cloud noise texture already since register  	// combiners blending below requires something to be bound  	// and we might as well only bind once. -	//gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE); +	gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);  	gPipeline.disableLights(); - -	if (!LLPipeline::sReflectionRender) -	{ -		glPointSize(2.f); -	} - +	  	// *NOTE: we divide by two here and GL_ALPHA_SCALE by two below to avoid  	// clamping and allow the star_alpha param to brighten the stars.  	bool error; @@ -175,16 +170,20 @@ void LLDrawPoolWLSky::renderStars(void) const  	star_alpha.mV[3] = LLWLParamManager::instance()->mCurParams.getFloat("star_brightness", error) / 2.f;  	llassert_always(!error); +	gGL.getTexUnit(0)->bind(gSky.mVOSkyp->getBloomTex()); + +	gGL.pushMatrix(); +	glRotatef(gFrameTimeSeconds*0.01f, 0.f, 0.f, 1.f);  	// gl_FragColor.rgb = gl_Color.rgb;  	// gl_FragColor.a = gl_Color.a * star_alpha.a; -	gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); -	gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT_X2, LLTexUnit::TBS_PREV_ALPHA, LLTexUnit::TBS_CONST_ALPHA); +	gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_VERT_COLOR); +	gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT_X2, LLTexUnit::TBS_CONST_ALPHA, LLTexUnit::TBS_TEX_ALPHA);  	glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, star_alpha.mV);  	gSky.mVOWLSkyp->drawStars(); -	glPointSize(1.f); - +	gGL.popMatrix(); +	  	// and disable the combiner states  	gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);  } diff --git a/indra/newview/lldrawpoolwlsky.h b/indra/newview/lldrawpoolwlsky.h index 7ff760ac39..9059f6382f 100644 --- a/indra/newview/lldrawpoolwlsky.h +++ b/indra/newview/lldrawpoolwlsky.h @@ -43,7 +43,7 @@ public:  	static const U32 SKY_VERTEX_DATA_MASK =	LLVertexBuffer::MAP_VERTEX |  							LLVertexBuffer::MAP_TEXCOORD0;  	static const U32 STAR_VERTEX_DATA_MASK =	LLVertexBuffer::MAP_VERTEX | -							LLVertexBuffer::MAP_COLOR; +		LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_TEXCOORD0;  	LLDrawPoolWLSky(void);  	/*virtual*/ ~LLDrawPoolWLSky(); diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index d1236b948e..75414f31f2 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -644,12 +644,11 @@ LLPanel*	LLSideTray::showPanel		(const std::string& panel_name, const LLSD& para  // This is just LLView::findChildView specialized to restrict the search to LLPanels.  // Optimization for EXT-4068 to avoid searching down to the individual item level  // when inventories are large. -LLPanel *findChildPanel(LLPanel *panel, const std::string& name, bool recurse, S32& count) +LLPanel *findChildPanel(LLPanel *panel, const std::string& name, bool recurse)  {  	for (LLView::child_list_const_iter_t child_it = panel->beginChild();  		 child_it != panel->endChild(); ++child_it)  	{ -		count++;  		LLPanel *child_panel = dynamic_cast<LLPanel*>(*child_it);  		if (!child_panel)  			continue; @@ -661,11 +660,10 @@ LLPanel *findChildPanel(LLPanel *panel, const std::string& name, bool recurse, S  		for (LLView::child_list_const_iter_t child_it = panel->beginChild();  			 child_it != panel->endChild(); ++child_it)  		{ -			count++;  			LLPanel *child_panel = dynamic_cast<LLPanel*>(*child_it);  			if (!child_panel)  				continue; -			LLPanel *found_panel = findChildPanel(child_panel,name,recurse,count); +			LLPanel *found_panel = findChildPanel(child_panel,name,recurse);  			if (found_panel)  			{  				return found_panel; @@ -677,16 +675,9 @@ LLPanel *findChildPanel(LLPanel *panel, const std::string& name, bool recurse, S  LLPanel* LLSideTray::getPanel(const std::string& panel_name)  { -	static S32 max_count = 0; -	S32 count = 0;  	for ( child_vector_const_iter_t child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)  	{ -		LLPanel *panel = findChildPanel(*child_it,panel_name,true,count); -		if (count > max_count) -		{ -			max_count = count; -			llwarns << "max_count " << max_count << llendl; -		} +		LLPanel *panel = findChildPanel(*child_it,panel_name,true);  		if(panel)  		{  			return panel; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index d0acb0bd39..5958742db2 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2535,6 +2535,7 @@ void LLVOAvatar::idleUpdateLoadingEffect()  		if (isFullyLoaded())  		{  			deleteParticleSource(); +			updateLOD();  		}  		else  		{ diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index d3238f16a8..0272a2ab34 100644 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -491,7 +491,7 @@ void LLVOWLSky::drawStars(void)  	if (mStarsVerts.notNull())  	{  		mStarsVerts->setBuffer(LLDrawPoolWLSky::STAR_VERTEX_DATA_MASK); -		mStarsVerts->draw(LLRender::POINTS, getStarsNumIndices(), 0); +		mStarsVerts->drawArrays(LLRender::QUADS, 0, getStarsNumVerts()*4);  	}  } @@ -546,6 +546,7 @@ void LLVOWLSky::initStars()  	std::vector<F32>::iterator v_i = mStarIntensities.begin();  	U32 i; +  	for (i = 0; i < getStarsNumVerts(); ++i)  	{  		v_p->mV[VX] = ll_frand() - 0.5f; @@ -771,17 +772,17 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable)  {  	LLStrider<LLVector3> verticesp;  	LLStrider<LLColor4U> colorsp; -	LLStrider<U16> indicesp; +	LLStrider<LLVector2> texcoordsp;  	if (mStarsVerts.isNull())  	{  		mStarsVerts = new LLVertexBuffer(LLDrawPoolWLSky::STAR_VERTEX_DATA_MASK, GL_DYNAMIC_DRAW); -		mStarsVerts->allocateBuffer(getStarsNumVerts(), getStarsNumIndices(), TRUE); +		mStarsVerts->allocateBuffer(getStarsNumVerts()*4, 0, TRUE);  	} - +   	BOOL success = mStarsVerts->getVertexStrider(verticesp) -		&& mStarsVerts->getIndexStrider(indicesp) -		&& mStarsVerts->getColorStrider(colorsp); +		&& mStarsVerts->getColorStrider(colorsp) +		&& mStarsVerts->getTexCoord0Strider(texcoordsp);  	if(!success)  	{ @@ -791,11 +792,37 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable)  	// *TODO: fix LLStrider with a real prefix increment operator so it can be  	// used as a model of OutputIterator. -Brad  	// std::copy(mStarVertices.begin(), mStarVertices.end(), verticesp); + +	if (mStarVertices.size() < getStarsNumVerts()) +	{ +		llerrs << "Star reference geometry insufficient." << llendl; +	} +  	for (U32 vtx = 0; vtx < getStarsNumVerts(); ++vtx)  	{ +		LLVector3 at = mStarVertices[vtx]; +		at.normVec(); +		LLVector3 left = at%LLVector3(0,0,1); +		LLVector3 up = at%left; + +		F32 sc = 0.5f+ll_frand()*1.25f; +		left *= sc; +		up *= sc; +  		*(verticesp++)  = mStarVertices[vtx]; +		*(verticesp++) = mStarVertices[vtx]+left; +		*(verticesp++) = mStarVertices[vtx]+left+up; +		*(verticesp++) = mStarVertices[vtx]+up; + +		*(texcoordsp++) = LLVector2(0,0); +		*(texcoordsp++) = LLVector2(0,1); +		*(texcoordsp++) = LLVector2(1,1); +		*(texcoordsp++) = LLVector2(1,0); + +		*(colorsp++)    = LLColor4U(mStarColors[vtx]); +		*(colorsp++)    = LLColor4U(mStarColors[vtx]); +		*(colorsp++)    = LLColor4U(mStarColors[vtx]);  		*(colorsp++)    = LLColor4U(mStarColors[vtx]); -		*(indicesp++)   = vtx;  	}  	mStarsVerts->setBuffer(0); diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency.xml b/indra/newview/skins/default/xui/en/floater_buy_currency.xml index 26b003cafe..86229c6691 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml @@ -222,7 +222,7 @@       width="300"       height="30"       name="currency_links"> -      [http://www.secondlife.com/ payment method] | [http://www.secondlife.com/ currency] | [http://www.secondlife.com/my/account/exchange_rates.php exchange rate] +      [http://www.secondlife.com/my/account/payment_method_management.php payment method] | [http://www.secondlife.com/my/account/currency.php currency] | [http://www.secondlife.com/my/account/exchange_rates.php exchange rate]      </text>      <text       type="string" diff --git a/indra/newview/skins/default/xui/en/floater_lsl_guide.xml b/indra/newview/skins/default/xui/en/floater_lsl_guide.xml index a5b477313c..c9d87f158f 100644 --- a/indra/newview/skins/default/xui/en/floater_lsl_guide.xml +++ b/indra/newview/skins/default/xui/en/floater_lsl_guide.xml @@ -8,9 +8,9 @@   min_height="271"   min_width="350"   name="script ed float" - help_topic="script_ed_float" + help_topic="lsl_reference"   save_rect="true" - title="LSL WIKI" + title="LSL REFERENCE"   width="370">      <check_box       follows="top|left" diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index f5bda71846..b9f61ca7e1 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -143,7 +143,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential                          << " with uri '" << uri << "', credentials " << printable_credentials << LL_ENDL;  	// Arriving in SRVRequest state -    LLEventStream replyPump("reply", true); +    LLEventStream replyPump("SRVreply", true);      // Should be an array of one or more uri strings.      LLSD rewrittenURIs;      { @@ -181,6 +181,10 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential      } // we no longer need the filter      LLEventPump& xmlrpcPump(LLEventPumps::instance().obtain("LLXMLRPCTransaction")); +    // EXT-4193: use a DIFFERENT reply pump than for the SRV request. We used +    // to share them -- but the EXT-3934 fix made it possible for an abandoned +    // SRV response to arrive just as we were expecting the XMLRPC response. +    LLEventStream loginReplyPump("loginreply", true);      // Loop through the rewrittenURIs, counting attempts along the way.      // Because of possible redirect responses, we may make more than one @@ -191,7 +195,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential           urit != urend; ++urit)      {          LLSD request(credentials); -        request["reply"] = replyPump.getName(); +        request["reply"] = loginReplyPump.getName();          request["uri"] = *urit;          std::string status; @@ -216,11 +220,11 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential              // possible for the reply to arrive before the post() call              // returns. Subsequent responses, of course, must be awaited              // without posting again. -            for (mAuthResponse = validateResponse(replyPump.getName(), -                                     postAndWait(self, request, xmlrpcPump, replyPump, "reply")); +            for (mAuthResponse = validateResponse(loginReplyPump.getName(), +                                 postAndWait(self, request, xmlrpcPump, loginReplyPump, "reply"));                   mAuthResponse["status"].asString() == "Downloading"; -                 mAuthResponse = validateResponse(replyPump.getName(), -                                     waitForEventOn(self, replyPump))) +                 mAuthResponse = validateResponse(loginReplyPump.getName(), +                                     waitForEventOn(self, loginReplyPump)))              {                  // Still Downloading -- send progress update.                  sendProgressEvent("offline", "downloading"); diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp index 8463e6d2ca..51f5cd0692 100644 --- a/indra/viewer_components/login/tests/lllogin_test.cpp +++ b/indra/viewer_components/login/tests/lllogin_test.cpp @@ -441,8 +441,8 @@ namespace tut  		// Testing normal login procedure.  		LLEventStream llaresPump("LLAres"); // Dummy LLAres pump. -		// LLAresListener dummyLLAres("dummy_llares"); -		// dummyLLAres.listenTo(llaresPump); +		LLAresListener dummyLLAres("dummy_llares"); +		dummyLLAres.listenTo(llaresPump);  		LLLogin login;  		LoginListener listener("test_ear"); @@ -470,6 +470,12 @@ namespace tut  		// the original URI.  		ensure_equals("Auth state", listener.lastEvent()["change"].asString(), "authenticating");   		ensure_equals("Attempt", listener.lastEvent()["data"]["attempt"].asInteger(), 1);  -		ensure_equals("URI", listener.lastEvent()["data"]["request"]["uri"].asString(), "login.bar.com");  +		ensure_equals("URI", listener.lastEvent()["data"]["request"]["uri"].asString(), "login.bar.com"); + +		// EXT-4193: if the SRV reply isn't lost but merely late, and if it +		// arrives just at the moment we're expecting the XMLRPC reply, the +		// original code got confused and crashed. Drive that case here. We +		// observe that without the fix, this call DOES repro. +		dummyLLAres.sendReply();  	}  } | 
