Skip to content

Commit

Permalink
Fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
AlpyneDreams committed Dec 7, 2024
1 parent 26c23b0 commit 3d74a99
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 7 additions & 0 deletions vphysics_jolt/vjolt_debugrender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ JoltPhysicsDebugRenderer::~JoltPhysicsDebugRenderer()
{
}

JoltPhysicsDebugRenderer::BatchImpl::~BatchImpl()
{
CMatRenderContextPtr pRenderContext(g_pMaterialSystem);
for (IMesh* pMesh : m_Meshes)
pRenderContext->DestroyStaticMesh(pMesh);
}

void JoltPhysicsDebugRenderer::DrawLine( JPH::Vec3Arg inFrom, JPH::Vec3Arg inTo, JPH::ColorArg inColor )
{
Vector v1 = JoltToSource::Distance( inFrom );
Expand Down
7 changes: 1 addition & 6 deletions vphysics_jolt/vjolt_debugrender.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,7 @@ class JoltPhysicsDebugRenderer final : public JPH::DebugRenderer
public:
BatchImpl() {}
BatchImpl( IMesh *pMesh ) { AddMesh( pMesh ); }
~BatchImpl()
{
CMatRenderContextPtr pRenderContext( g_pMaterialSystem );
for ( IMesh* pMesh : m_Meshes )
pRenderContext->DestroyStaticMesh( pMesh );
}
~BatchImpl();

void AddRef() override { JPH::RefTarget<BatchImpl>::AddRef(); }
void Release() override { JPH::RefTarget<BatchImpl>::Release(); }
Expand Down

0 comments on commit 3d74a99

Please sign in to comment.