mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 16:14:38 +00:00
Update gfxDrawUtil.cpp
safety no longer needed due to safe initializers
This commit is contained in:
parent
585279ae82
commit
65850df9bd
1 changed files with 2 additions and 6 deletions
|
|
@ -853,11 +853,7 @@ void GFXDrawUtil::drawThickLine(F32 x1, F32 y1, F32 z1, F32 x2, F32 y2, F32 z2,
|
||||||
// 3D World Draw Misc
|
// 3D World Draw Misc
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
SphereMesh& getSphere()
|
static SphereMesh gSphere;
|
||||||
{
|
|
||||||
static SphereMesh instance;
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
void GFXDrawUtil::drawSphere( const GFXStateBlockDesc &desc, F32 radius, const Point3F &pos, const ColorI &color, bool drawTop, bool drawBottom, const MatrixF *xfm )
|
void GFXDrawUtil::drawSphere( const GFXStateBlockDesc &desc, F32 radius, const Point3F &pos, const ColorI &color, bool drawTop, bool drawBottom, const MatrixF *xfm )
|
||||||
{
|
{
|
||||||
|
|
@ -872,7 +868,7 @@ void GFXDrawUtil::drawSphere( const GFXStateBlockDesc &desc, F32 radius, const P
|
||||||
GFX->pushWorldMatrix();
|
GFX->pushWorldMatrix();
|
||||||
GFX->multWorld(mat);
|
GFX->multWorld(mat);
|
||||||
|
|
||||||
const SphereMesh::TriangleMesh * sphereMesh = getSphere().getMesh(2);
|
const SphereMesh::TriangleMesh * sphereMesh = gSphere.getMesh(2);
|
||||||
S32 numPoly = sphereMesh->numPoly;
|
S32 numPoly = sphereMesh->numPoly;
|
||||||
S32 totalPoly = 0;
|
S32 totalPoly = 0;
|
||||||
GFXVertexBufferHandle<GFXVertexPCT> verts(mDevice, numPoly*3, GFXBufferTypeVolatile);
|
GFXVertexBufferHandle<GFXVertexPCT> verts(mDevice, numPoly*3, GFXBufferTypeVolatile);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue