mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Fixed weird timing issues with std::future
This commit is contained in:
@@ -189,10 +189,9 @@ namespace Nuake
|
||||
|
||||
m_IndicesCount = static_cast<uint32_t>(m_Indices.size());
|
||||
|
||||
std::vector<Vertex> vertices;
|
||||
|
||||
auto asyncResult = std::async(std::launch::async, [&]()
|
||||
auto result = std::async(std::launch::async, [&]()
|
||||
{
|
||||
std::vector<Vertex> vertices;
|
||||
for (auto& v : j["Vertices"])
|
||||
{
|
||||
Vertex vertex;
|
||||
@@ -208,10 +207,12 @@ namespace Nuake
|
||||
DESERIALIZE_VEC3(v["Bitangent"], vertex.bitangent)
|
||||
vertices.push_back(vertex);
|
||||
}
|
||||
|
||||
return vertices;
|
||||
}
|
||||
);
|
||||
|
||||
m_Vertices = vertices;
|
||||
m_Vertices = result.get();
|
||||
|
||||
SetupMesh();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user