diff options
author | prep <prep@lindenlab.com> | 2011-12-01 10:54:21 -0500 |
---|---|---|
committer | prep <prep@lindenlab.com> | 2011-12-01 10:54:21 -0500 |
commit | 0538dcf62e3c13b50fc0828e930fa50e4050302d (patch) | |
tree | 22db10891a271b591766bd048f48dfbef5800f2d /indra/llrender | |
parent | 38b7f033b28027711a03e5a28d6ea384be909318 (diff) |
New navmesh viewer options, rendering improvements, etc.
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llrendersegment.cpp | 31 | ||||
-rw-r--r-- | indra/llrender/llrendersegment.h | 1 |
2 files changed, 25 insertions, 7 deletions
diff --git a/indra/llrender/llrendersegment.cpp b/indra/llrender/llrendersegment.cpp index 8f856f62f3..1f57af174e 100644 --- a/indra/llrender/llrendersegment.cpp +++ b/indra/llrender/llrendersegment.cpp @@ -36,19 +36,36 @@ LLRenderSegment gSegment;
//=============================================================================
void LLRenderSegment::renderSegment( const LLVector3& start, const LLVector3& end, int color )
-{
- LLColor4 colorA = LLColor4::yellow;
-
- gGL.color4fv( colorA.mV ); +{ +
+ LLColor4 colorA( color );
+ glLineWidth(1.5f);
+ gGL.color3fv( colorA.mV ); gGL.begin(LLRender::LINES); { gGL.vertex3fv( start.mV ); - gGL.vertex3fv( end.mV ); } - + gGL.end();
+ glLineWidth(1.0f);
+}
+//=============================================================================
+void LLRenderSegment::renderTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, int color )
+{
+ LLGLEnable offset(GL_POLYGON_OFFSET_LINE);
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ glLineWidth(1.5f);
+ LLColor4 colorA( color );
+ gGL.color4fv( colorA.mV ); + gGL.begin(LLRender::TRIANGLES); + { + gGL.vertex3fv( a.mV ); + gGL.vertex3fv( b.mV ); + gGL.vertex3fv( c.mV ); + } gGL.end();
-
+
+ glLineWidth(1.f);
}
//=============================================================================
\ No newline at end of file diff --git a/indra/llrender/llrendersegment.h b/indra/llrender/llrendersegment.h index d929d6f628..58bc083e25 100644 --- a/indra/llrender/llrendersegment.h +++ b/indra/llrender/llrendersegment.h @@ -40,6 +40,7 @@ class LLRenderSegment {
public:
void renderSegment( const LLVector3& start, const LLVector3& end, int color );
+ void renderTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, int color );
private:
};
|