| 734 | } |
| 735 | |
| 736 | void GFXDrawUtil::_drawWireTriangle( const GFXStateBlockDesc &desc, const Point3F &p0, const Point3F &p1, const Point3F &p2, const ColorI &color, const MatrixF *xfm ) |
| 737 | { |
| 738 | GFXVertexBufferHandle<GFXVertexPCT> verts(mDevice, 4, GFXBufferTypeVolatile); |
| 739 | verts.lock(); |
| 740 | // Set up the line strip |
| 741 | verts[0].point = p0; |
| 742 | verts[0].color = color; |
| 743 | verts[1].point = p1; |
| 744 | verts[1].color = color; |
| 745 | verts[2].point = p2; |
| 746 | verts[2].color = color; |
| 747 | verts[3].point = p0; |
| 748 | verts[3].color = color; |
| 749 | |
| 750 | // Apply xfm if we were passed one. |
| 751 | if ( xfm != NULL ) |
| 752 | { |
| 753 | for ( U32 i = 0; i < 4; i++ ) |
| 754 | xfm->mulP( verts[i].point ); |
| 755 | } |
| 756 | |
| 757 | verts.unlock(); |
| 758 | |
| 759 | GFXStateBlockRef sb = mDevice->createStateBlock( desc ); |
| 760 | mDevice->setStateBlock( sb ); |
| 761 | |
| 762 | mDevice->setVertexBuffer( verts ); |
| 763 | mDevice->setupGenericShaders(); |
| 764 | |
| 765 | mDevice->drawPrimitive( GFXLineStrip, 0, 3 ); |
| 766 | } |
| 767 | |
| 768 | void GFXDrawUtil::_drawSolidTriangle( const GFXStateBlockDesc &desc, const Point3F &p0, const Point3F &p1, const Point3F &p2, const ColorI &color, const MatrixF *xfm ) |
| 769 | { |
nothing calls this directly
no test coverage detected