Skip to content

Commit

Permalink
alias end of the vertex buffer as a tempoary array
Browse files Browse the repository at this point in the history
  • Loading branch information
G-glop committed Dec 31, 2018
1 parent 939d53b commit f38dd95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgui_draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ void ImDrawList::AddConvexPolyFilled(const ImVec2* points, const int points_coun
}

// Compute normals
ImVec2* temp_normals = (ImVec2*)alloca(points_count * sizeof(ImVec2));
ImVec2* temp_normals = (ImVec2*)((size_t)(_VtxWritePtr + vtx_count) & ~(alignof(ImVec2) - 1)) - points_count;
for (int i0 = points_count - 1, i1 = 0; i1 < points_count; i0 = i1++)
{
const ImVec2& p0 = points[i0];
Expand Down

0 comments on commit f38dd95

Please sign in to comment.