Remove unnecessary buffer

This commit is contained in:
Georg Hagen
2025-01-05 23:31:42 +01:00
parent 4f1d730e30
commit 92b9fb597f
8 changed files with 79 additions and 121 deletions

View File

@@ -53,7 +53,6 @@ namespace OpenVulkano
m_nodesPool.resize(N);
m_drawablesPool.reserve(N);
BillboardControlBlock billboardSettings;
LabelDrawableSettings labelSettings;
for (int i = 0; i < N; i++)
@@ -69,7 +68,6 @@ namespace OpenVulkano
}
bool isBillboard = i % 2 == 0 ? 1 : 0;
LabelDrawable& label = m_drawablesPool.emplace_back(textDrawable.GetAtlasData(), labelSettings, isBillboard);
label.SetBillboardSettings(billboardSettings);
label.AddText(texts[i]);
if (i == 2)
{
@@ -80,7 +78,7 @@ namespace OpenVulkano
}
m_drawablesPool[i].SetIsHittable(true);
m_scene.GetRoot()->AddChild(&m_nodesPool[i]);
m_nodesPool[i].SetMatrix(Math::Utils::translate(glm::mat4x4(1.f), Vector3f(-5 + std::rand() % 5, -5 + std::rand() % 5, -std::rand() % 10)));
m_nodesPool[i].SetMatrix(Math::Utils::translate(glm::mat4x4(1.f), Vector3f(5 - std::rand() % 10, 5 - std::rand() % 10, 5 - std::rand() % 10)));
m_nodesPool[i].AddDrawable(&m_drawablesPool[i]);
}