diff options
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/app_settings/shaders/class1/objects/indexedTextureV.glsl | 4 | ||||
| -rw-r--r-- | indra/newview/lldrawable.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/lldrawpool.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/lldrawpoolterrain.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/lldrawpooltree.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llface.cpp | 11 | ||||
| -rwxr-xr-x | indra/newview/lltexturefetch.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llviewerobject.cpp | 8 | ||||
| -rw-r--r-- | indra/newview/llviewertexture.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/llvosurfacepatch.cpp | 4 | 
10 files changed, 31 insertions, 16 deletions
| diff --git a/indra/newview/app_settings/shaders/class1/objects/indexedTextureV.glsl b/indra/newview/app_settings/shaders/class1/objects/indexedTextureV.glsl index 7c0699d72f..ca29bf3143 100644 --- a/indra/newview/app_settings/shaders/class1/objects/indexedTextureV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/indexedTextureV.glsl @@ -23,9 +23,9 @@   * $/LicenseInfo$   */ -ATTRIBUTE ivec4 texture_index; +ATTRIBUTE int texture_index; -VARYING_FLAT ivec4 vary_texture_index; +VARYING_FLAT int vary_texture_index;  void passTextureIndex()  { diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 82ea5cd5a6..4eda2b92b3 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -625,8 +625,6 @@ BOOL LLDrawable::updateMove()  		return FALSE;  	} -	makeActive(); -	  	BOOL done;  	if (isState(MOVE_UNDAMPED)) @@ -635,6 +633,7 @@ BOOL LLDrawable::updateMove()  	}  	else  	{ +		makeActive();  		done = updateMoveDamped();  	}  	return done; diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 6c0be0a5c2..b8c143e9c1 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -418,6 +418,7 @@ void LLRenderPass::applyModelMatrix(LLDrawInfo& params)  		gGL.loadMatrix(gGLModelView);  		if (params.mModelMatrix)  		{ +			llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW);  			gGL.multMatrix((GLfloat*) params.mModelMatrix->mMatrix);  		}  		gPipeline.mMatrixOpCount++; diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index 7fc78fb382..9bc32fddbd 100644 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -308,6 +308,7 @@ void LLDrawPoolTerrain::drawLoop()  			if (model_matrix != gGLLastMatrix)  			{ +				llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW);  				gGLLastMatrix = model_matrix;  				gGL.loadMatrix(gGLModelView);  				if (model_matrix) @@ -594,7 +595,8 @@ void LLDrawPoolTerrain::renderFull4TU()  	gGL.matrixMode(LLRender::MM_TEXTURE);  	gGL.loadIdentity();  	gGL.translatef(-1.f, 0.f, 0.f); -   +	gGL.matrixMode(LLRender::MM_MODELVIEW); +  	// Set alpha texture and do lighting modulation  	gGL.getTexUnit(3)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_PREV_COLOR, LLTexUnit::TBS_VERT_COLOR);  	gGL.getTexUnit(3)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA); @@ -742,6 +744,7 @@ void LLDrawPoolTerrain::renderFull2TU()  	gGL.matrixMode(LLRender::MM_TEXTURE);  	gGL.loadIdentity();  	gGL.translatef(-1.f, 0.f, 0.f); +	gGL.matrixMode(LLRender::MM_MODELVIEW);  	// Care about alpha only  	gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); @@ -781,6 +784,7 @@ void LLDrawPoolTerrain::renderFull2TU()  	gGL.matrixMode(LLRender::MM_TEXTURE);  	gGL.loadIdentity();  	gGL.translatef(-2.f, 0.f, 0.f); +	gGL.matrixMode(LLRender::MM_MODELVIEW);  	// Care about alpha only  	gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index 83f04e45a8..fedbd782dc 100644 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -116,6 +116,7 @@ void LLDrawPoolTree::render(S32 pass)  				gGL.loadMatrix(gGLModelView);  				if (model_matrix)  				{ +					llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW);  					gGL.multMatrix((GLfloat*) model_matrix->mMatrix);  				}  				gPipeline.mMatrixOpCount++; diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index f5b217d539..4b107ae151 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1943,15 +1943,12 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,  			LLVector4a texIdx; -			U8 index = mTextureIndex < 255 ? mTextureIndex : 0; +			S32 index = mTextureIndex < 255 ? mTextureIndex : 0;  			F32 val = 0.f; -			U8* vp = (U8*) &val; -			vp[0] = index; -			vp[1] = 0; -			vp[2] = 0; -			vp[3] = 0; - +			S32* vp = (S32*) &val; +			*vp = index; +			  			llassert(index <= LLGLSLShader::sIndexedTextureChannels-1);  			LLVector4Logical mask; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 7e6dfbc9d9..2ed7488b85 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -1249,6 +1249,12 @@ bool LLTextureFetchWorker::doWork(S32 param)  				S32 max_attempts;  				if (mGetStatus == HTTP_NOT_FOUND)  				{ +					if(mWriteToCacheState == NOT_WRITE) //map tiles +					{ +						mState = DONE; +						return true; // failed, means no map tile on the empty region. +					} +  					mHTTPFailCount = max_attempts = 1; // Don't retry  					llwarns << "Texture missing from server (404): " << mUrl << llendl; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index f5a3681437..b52c9d0d4b 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -782,7 +782,13 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp)  	}  	LLDrawable* old_parent = mDrawable->mParent;  	mDrawable->mParent = parentp;  -		 +	 +	if (parentp && mDrawable->isActive()) +	{ +		parentp->makeActive(); +		parentp->setState(LLDrawable::ACTIVE_CHILD); +	} +  	gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);  	if(	(old_parent != parentp && old_parent)  		|| (parentp && parentp->isActive())) diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 7f638a24bf..e1eb54bd24 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -2182,7 +2182,8 @@ void LLViewerFetchedTexture::setIsMissingAsset()  	}  	else  	{ -		llwarns << mUrl << ": Marking image as missing" << llendl; +		//it is normal no map tile on an empty region. +		//llwarns << mUrl << ": Marking image as missing" << llendl;  	}  	if (mHasFetcher)  	{ diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 94a3111f4c..cb905d02da 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -80,9 +80,9 @@ public:  			glNormalPointer(GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_NORMAL], (void*)(base + mOffsets[TYPE_NORMAL]));  		}  		if (data_mask & MAP_TEXCOORD3) -		{ //substitute tex coord 0 for tex coord 3 +		{ //substitute tex coord 1 for tex coord 3  			glClientActiveTextureARB(GL_TEXTURE3_ARB); -			glTexCoordPointer(2,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD0], (void*)(base + mOffsets[TYPE_TEXCOORD0])); +			glTexCoordPointer(2,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD1], (void*)(base + mOffsets[TYPE_TEXCOORD1]));  			glClientActiveTextureARB(GL_TEXTURE0_ARB);  		}  		if (data_mask & MAP_TEXCOORD2) | 
