diff options
author | Dave Parks <davep@lindenlab.com> | 2010-10-20 14:39:28 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-10-20 14:39:28 -0500 |
commit | 1ca35bb30fa18e2d39aa06247b4478740d82d798 (patch) | |
tree | 2624f75a2ecd6408e116d1c9f17d19d4fefe12cc /indra/newview/llspatialpartition.cpp | |
parent | 7be4856fde3a2b9e2caed4edf6bf65b55aea78b3 (diff) | |
parent | 187716a4ee9019b0133de865d9ede3c3abc3cc5b (diff) |
merge
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-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); + } + } + } + } } } |