|
|
@ -185,8 +185,7 @@ void CMeshInstance::Init( const virtualmeshlist_t &list ) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// UNDONE: Tune / expose this constant 512K budget for terrain collision
|
|
|
|
const int g_MeshSize = (2048 * 1024 * 4); // nillerusr: 2 MiB should be enough, old value causes problems in ep2
|
|
|
|
const int g_MeshSize = (2048 * 1024); |
|
|
|
|
|
|
|
static CDataManager<CMeshInstance, virtualmeshlist_t, CMeshInstance *, CThreadFastMutex> g_MeshManager( g_MeshSize ); |
|
|
|
static CDataManager<CMeshInstance, virtualmeshlist_t, CMeshInstance *, CThreadFastMutex> g_MeshManager( g_MeshSize ); |
|
|
|
static int numIndices = 0, numTriangles = 0, numBaseTriangles = 0, numSplits = 0; |
|
|
|
static int numIndices = 0, numTriangles = 0, numBaseTriangles = 0, numSplits = 0; |
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
@ -449,6 +448,9 @@ CMeshInstance *CPhysCollideVirtualMesh::BuildLedges() |
|
|
|
m_hMemory = g_MeshManager.CreateResource( list ); |
|
|
|
m_hMemory = g_MeshManager.CreateResource( list ); |
|
|
|
m_ledgeCount = list.triangleCount; |
|
|
|
m_ledgeCount = list.triangleCount; |
|
|
|
CMeshInstance *pMesh = g_MeshManager.LockResource( m_hMemory ); |
|
|
|
CMeshInstance *pMesh = g_MeshManager.LockResource( m_hMemory ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Assert( g_MeshManager.AvailableSize() != 0 ); |
|
|
|
|
|
|
|
|
|
|
|
return pMesh; |
|
|
|
return pMesh; |
|
|
|
} |
|
|
|
} |
|
|
|
return NULL; |
|
|
|
return NULL; |
|
|
|