From 864ebb90b62925f5e0c06ff1a67f425f0b20bbb7 Mon Sep 17 00:00:00 2001 From: Jeslas Pravin Date: Fri, 30 Jul 2021 04:09:01 +0200 Subject: [PATCH] fix: PlotShaded Opposite triangle winding (#269) --- implot_items.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/implot_items.cpp b/implot_items.cpp index 4abbb64..477980a 100644 --- a/implot_items.cpp +++ b/implot_items.cpp @@ -673,8 +673,8 @@ struct ShadedRenderer { DrawList._IdxWritePtr[1] = (ImDrawIdx)(DrawList._VtxCurrentIdx + 1 + intersect); DrawList._IdxWritePtr[2] = (ImDrawIdx)(DrawList._VtxCurrentIdx + 3); DrawList._IdxWritePtr[3] = (ImDrawIdx)(DrawList._VtxCurrentIdx + 1); - DrawList._IdxWritePtr[4] = (ImDrawIdx)(DrawList._VtxCurrentIdx + 3 - intersect); - DrawList._IdxWritePtr[5] = (ImDrawIdx)(DrawList._VtxCurrentIdx + 4); + DrawList._IdxWritePtr[4] = (ImDrawIdx)(DrawList._VtxCurrentIdx + 4); + DrawList._IdxWritePtr[5] = (ImDrawIdx)(DrawList._VtxCurrentIdx + 3 - intersect); DrawList._IdxWritePtr += 6; DrawList._VtxCurrentIdx += 5; P11 = P21;