| 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 | { |
| 770 | GFXVertexBufferHandle<GFXVertexPCT> verts(mDevice, 3, GFXBufferTypeVolatile); |
| 771 | verts.lock(); |
| 772 | // Set up the line strip |
| 773 | verts[0].point = p0; |
| 774 | verts[0].color = color; |
| 775 | verts[1].point = p1; |
| 776 | verts[1].color = color; |
| 777 | verts[2].point = p2; |
| 778 | verts[2].color = color; |
| 779 | |
| 780 | // Apply xfm if we were passed one. |
| 781 | if ( xfm != NULL ) |
| 782 | { |
| 783 | for ( U32 i = 0; i < 3; i++ ) |
| 784 | xfm->mulP( verts[i].point ); |
| 785 | } |
| 786 | |
| 787 | verts.unlock(); |
| 788 | |
| 789 | GFXStateBlockRef sb = mDevice->createStateBlock( desc ); |
| 790 | mDevice->setStateBlock( sb ); |
| 791 | |
| 792 | mDevice->setVertexBuffer( verts ); |
| 793 | mDevice->setupGenericShaders(); |
| 794 | |
| 795 | mDevice->drawPrimitive( GFXTriangleList, 0, 1 ); |
| 796 | } |
| 797 | |
| 798 | void GFXDrawUtil::drawPolygon( const GFXStateBlockDesc& desc, const Point3F* points, U32 numPoints, const ColorI& color, const MatrixF* xfm /* = NULL */ ) |
| 799 | { |
nothing calls this directly
no test coverage detected