Skip to content

Commit

Permalink
Added reserve call for vertexData to avoid unnecessary copies
Browse files Browse the repository at this point in the history
  • Loading branch information
adriengivry committed Feb 7, 2025
1 parent 5a3ce8c commit 5a2672d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ const OvRendering::Geometry::BoundingSphere& OvRendering::Resources::Mesh::GetBo
void OvRendering::Resources::Mesh::CreateBuffers(const std::vector<Geometry::Vertex>& p_vertices, const std::vector<uint32_t>& p_indices)
{
std::vector<float> vertexData;

std::vector<unsigned int> rawIndices;
vertexData.reserve(p_vertices.size() * 14);

for (const auto& vertex : p_vertices)
{
Expand Down

0 comments on commit 5a2672d

Please sign in to comment.