enable async loading, optimize rendering and distance checks

This commit is contained in:
savis
2025-12-26 06:21:13 +01:00
parent 1592ec93f6
commit 9907febf28
5 changed files with 40 additions and 6 deletions

View File

@@ -40,7 +40,8 @@ void CMapOutdoor::RenderTerrain()
//////////////////////////////////////////////////////////////////////////
// Push
m_PatchVector.clear();
m_PatchVector.reserve(256); // Pre-allocate to avoid reallocations
__RenderTerrain_RecurseRenderQuadTree(m_pRootNode);
// 거리순 정렬
@@ -491,6 +492,7 @@ void CMapOutdoor::RenderArea(bool bRenderAmbience)
{
static std::vector<CGraphicThingInstance*> s_kVct_pkOpaqueThingInstSort;
s_kVct_pkOpaqueThingInstSort.clear();
s_kVct_pkOpaqueThingInstSort.reserve(512); // Pre-allocate to avoid reallocations
for (int i = 0; i < AROUND_AREA_NUM; ++i)
{
@@ -522,6 +524,7 @@ void CMapOutdoor::RenderBlendArea()
static std::vector<CGraphicThingInstance*> s_kVct_pkBlendThingInstSort;
s_kVct_pkBlendThingInstSort.clear();
s_kVct_pkBlendThingInstSort.reserve(256); // Pre-allocate to avoid reallocations
for (int i = 0; i < AROUND_AREA_NUM; ++i)
{