From 500a8a0e02b113ec27a60c47da20796fe4ee7ee2 Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 9 Apr 2015 21:00:45 +0100 Subject: [PATCH] ImDrawList: bits of renaming. --- imgui.cpp | 12 ++++++------ imgui.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index bc7923ad..678c4f07 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -7804,9 +7804,9 @@ void ImDrawList::AddArcFast(const ImVec2& center, float radius, ImU32 col, int a for (int a0 = a_min; a0 < a_max; a0++) { int a1 = (a0 + 1 == SAMPLES) ? 0 : a0 + 1; - AddVtx(center + circle_vtx[a0] * radius, uv, col); - AddVtx(center + circle_vtx[a1] * radius, uv, col); - AddVtx(center + third_point_offset, uv, col); + PrimVtx(center + circle_vtx[a0] * radius, uv, col); + PrimVtx(center + circle_vtx[a1] * radius, uv, col); + PrimVtx(center + third_point_offset, uv, col); } } else @@ -7925,9 +7925,9 @@ void ImDrawList::AddCircleFilled(const ImVec2& centre, float radius, ImU32 col, for (int i = 0; i < num_segments; i++) { const float a1 = (i + 1) == num_segments ? 0.0f : a0 + a_step; - AddVtx(centre + ImVec2(cosf(a0), sinf(a0))*radius, uv, col); - AddVtx(centre + ImVec2(cosf(a1), sinf(a1))*radius, uv, col); - AddVtx(centre, uv, col); + PrimVtx(centre + ImVec2(cosf(a0), sinf(a0))*radius, uv, col); + PrimVtx(centre + ImVec2(cosf(a1), sinf(a1))*radius, uv, col); + PrimVtx(centre, uv, col); a0 = a1; } } diff --git a/imgui.h b/imgui.h index 07d07717..1ff50c6e 100644 --- a/imgui.h +++ b/imgui.h @@ -930,7 +930,7 @@ struct ImDrawList IMGUI_API void PrimLine(const ImVec2& a, const ImVec2& b, ImU32 col, float thickness = 1.0f); IMGUI_API void UpdateClipRect(); IMGUI_API void UpdateTextureID(); - inline IMGUI_API void AddVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) { vtx_write->pos = pos; vtx_write->uv = uv; vtx_write->col = col; vtx_write++; } + IMGUI_API void PrimVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) { vtx_write->pos = pos; vtx_write->uv = uv; vtx_write->col = col; vtx_write++; } }; // Load and rasterize multiple TTF fonts into a same texture.