From 65850df9bdf19662afdad1eef837e98cf15100e4 Mon Sep 17 00:00:00 2001 From: marauder2k7 Date: Wed, 4 Mar 2026 12:01:17 +0000 Subject: [PATCH] Update gfxDrawUtil.cpp safety no longer needed due to safe initializers --- Engine/source/gfx/gfxDrawUtil.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Engine/source/gfx/gfxDrawUtil.cpp b/Engine/source/gfx/gfxDrawUtil.cpp index 3dce4b3af..16b886a55 100644 --- a/Engine/source/gfx/gfxDrawUtil.cpp +++ b/Engine/source/gfx/gfxDrawUtil.cpp @@ -853,11 +853,7 @@ void GFXDrawUtil::drawThickLine(F32 x1, F32 y1, F32 z1, F32 x2, F32 y2, F32 z2, // 3D World Draw Misc //----------------------------------------------------------------------------- -SphereMesh& getSphere() -{ - static SphereMesh instance; - return instance; -} +static SphereMesh gSphere; 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->multWorld(mat); - const SphereMesh::TriangleMesh * sphereMesh = getSphere().getMesh(2); + const SphereMesh::TriangleMesh * sphereMesh = gSphere.getMesh(2); S32 numPoly = sphereMesh->numPoly; S32 totalPoly = 0; GFXVertexBufferHandle verts(mDevice, numPoly*3, GFXBufferTypeVolatile);