diff options
| -rw-r--r-- | indra/llprimitive/llmodel.cpp | 6 | ||||
| -rw-r--r-- | indra/llrender/llrendertarget.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llspatialpartition.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/pipeline.cpp | 93 | 
4 files changed, 15 insertions, 98 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index b3d5c7b072..e0cfa07614 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -2093,7 +2093,7 @@ void LLModel::Decomposition::fromLLSD(LLSD& decomp)  	if (decomp.has("BoundingVerts"))  	{ -		const LLSD::Binary& position = decomp["BundingVerts"].asBinary(); +		const LLSD::Binary& position = decomp["BoundingVerts"].asBinary();  		U16* p = (U16*) &position[0]; @@ -2129,7 +2129,7 @@ void LLModel::Decomposition::fromLLSD(LLSD& decomp)  	{  		//empty base hull mesh to indicate decomposition has been loaded  		//but contains no base hull -		mBaseHullMesh.clear();; +		mBaseHullMesh.clear();  	}  } @@ -2252,6 +2252,8 @@ LLSD LLModel::Decomposition::asLLSD() const  		ret["Positions"] = p;  	} +	llassert(!mBaseHull.empty()); +  	if (!mBaseHull.empty())  	{  		LLSD::Binary p(mBaseHull.size()*3*2); diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index e773a639b0..b6463309e1 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -75,6 +75,9 @@ LLRenderTarget::~LLRenderTarget()  void LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage, bool use_fbo, S32 samples)  {  	stop_glerror(); +	 +	release(); +  	mResX = resx;  	mResY = resy; @@ -96,8 +99,6 @@ void LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, boo  		mSamples = 0;  	} -	release(); -  	if ((sUseFBO || use_fbo) && gGLManager.mHasFramebufferObject)  	{  		if (depth) @@ -337,6 +338,8 @@ void LLRenderTarget::release()  		LLImageGL::deleteTextures(mTex.size(), &mTex[0], true);  		mTex.clear();  	} +	 +	mResX = mResY = 0;  	sBoundTarget = NULL;  } diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index d96fa087b1..a5b91729e8 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -2969,13 +2969,6 @@ void render_hull(LLModel::PhysicsMesh& mesh, const LLColor4& color, const LLColo  void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)  { -	if (volume->isSelected()) -	{ -		LLVector3 construct_me(5,5,5); -		construct_me.normalize(); -	} - -	  	U8 physics_type = volume->getPhysicsShapeType();  	if (physics_type == LLViewerObject::PHYSICS_SHAPE_NONE || volume->isFlexible()) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index f2294335ed..ba948bf139 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -773,31 +773,7 @@ void LLPipeline::updateRenderDeferred()  //static  void LLPipeline::refreshRenderDeferred()  { -	static BOOL physics_shapes_is_on = FALSE ; -	static BOOL render_glow_copy = FALSE ; - -	if(gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PHYSICS_SHAPES)) -	{ -		if(!physics_shapes_is_on) -		{ -			physics_shapes_is_on = TRUE ; -			render_glow_copy = sRenderGlow ; -		} - -		//turn the deferred rendering and glow off when draw physics shapes. -		sRenderDeferred = FALSE ; -		sRenderGlow = FALSE ; -	} -	else -	{ -		if(physics_shapes_is_on) -		{ -			physics_shapes_is_on = FALSE ; -			sRenderGlow = render_glow_copy ; -		} - -		updateRenderDeferred() ; -	} +	updateRenderDeferred();  }  void LLPipeline::releaseGLBuffers() @@ -6106,7 +6082,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)  {  	LLMemType mt_ru(LLMemType::MTYPE_PIPELINE_RENDER_BLOOM);  	if (!(gPipeline.canUseVertexShaders() && -		sRenderGlow)) +		sRenderGlow) || +		(!sRenderDeferred && hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PHYSICS_SHAPES)))  	{  		return;  	} @@ -6152,67 +6129,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)  	gGL.setColorMask(true, true);  	glClearColor(0,0,0,0); - -	/*if (for_snapshot) -	{ -		gGL.getTexUnit(0)->bind(&mGlow[1]); -		{ -			//LLGLEnable stencil(GL_STENCIL_TEST); -			//glStencilFunc(GL_NOTEQUAL, 255, 0xFFFFFFFF); -			//glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); -			//LLGLDisable blend(GL_BLEND); - -			// If the snapshot is constructed from tiles, calculate which -			// tile we're in. - -			//from LLViewerCamera::setPerpsective -			if (zoom_factor > 1.f) -			{ -				int pos_y = subfield / llceil(zoom_factor); -				int pos_x = subfield - (pos_y*llceil(zoom_factor)); -				F32 size = 1.f/zoom_factor; - -				tc1.set(pos_x*size, pos_y*size); -				tc2 = tc1 + LLVector2(size,size); -			} -			else -			{ -				tc2.set(1,1); -			} -			 -			LLGLEnable blend(GL_BLEND); -			gGL.setSceneBlendType(LLRender::BT_ADD); -			 -				 -			gGL.begin(LLRender::TRIANGLE_STRIP); -			gGL.color4f(1,1,1,1); -			gGL.texCoord2f(tc1.mV[0], tc1.mV[1]); -			gGL.vertex2f(-1,-1); -			 -			gGL.texCoord2f(tc1.mV[0], tc2.mV[1]); -			gGL.vertex2f(-1,1); -			 -			gGL.texCoord2f(tc2.mV[0], tc1.mV[1]); -			gGL.vertex2f(1,-1); -			 -			gGL.texCoord2f(tc2.mV[0], tc2.mV[1]); -			gGL.vertex2f(1,1); - -			gGL.end(); - -			gGL.flush(); -			gGL.setSceneBlendType(LLRender::BT_ALPHA); -		} - -		gGL.flush(); -		glMatrixMode(GL_PROJECTION); -		glPopMatrix(); -		glMatrixMode(GL_MODELVIEW); -		glPopMatrix(); - -		return; -	}*/ -	 +		  	{  		{  			LLFastTimer ftm(FTM_RENDER_BLOOM_FBO); @@ -6568,6 +6485,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)  	if (hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PHYSICS_SHAPES))  	{ +		gGL.setColorMask(true, false); +  		LLVector2 tc1(0,0);  		LLVector2 tc2((F32) gViewerWindow->getWorldViewWidthRaw()*2,  				  (F32) gViewerWindow->getWorldViewHeightRaw()*2);  | 
