diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llspatialpartition.cpp | 25 | 
1 files changed, 25 insertions, 0 deletions
| diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index e763f92fab..c23756611d 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -3195,6 +3195,31 @@ void renderPhysicsShapes(LLSpatialGroup* group)  				renderPhysicsShape(drawable, volume);  			}  		} +		else +		{ +			LLViewerObject* object = drawable->getVObj(); +			if (object && object->getPCode() == LLViewerObject::LL_VO_SURFACE_PATCH) +			{ +				//push face vertices for terrain +				for (S32 i = 0; i < drawable->getNumFaces(); ++i) +				{ +					LLFace* face = drawable->getFace(i); +					LLVertexBuffer* buff = face->mVertexBuffer; +					if (buff) +					{ +						glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + +						buff->setBuffer(LLVertexBuffer::MAP_VERTEX); +						glColor3f(0.2f, 0.5f, 0.3f); +						buff->draw(LLRender::TRIANGLES, buff->getRequestedIndices(), 0); +									 +						glColor3f(0.2f, 1.f, 0.3f); +						glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); +						buff->draw(LLRender::TRIANGLES, buff->getRequestedIndices(), 0); +					} +				} +			} +		}  	}  } | 
