mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-06 06:25:54 +01:00
DrawList: Fixed vertex count calculation in_AddRectTinyRounding()
This commit is contained in:
parent
3fca7ef414
commit
e9246e6ad3
@ -2370,7 +2370,7 @@ void ImDrawList::_AddRectTinyRounding(const ImVec2& p_min, const ImVec2& p_max,
|
|||||||
const int arc_step = ImClamp(IM_DRAWLIST_ARCFAST_SAMPLE_MAX / this->_CalcCircleAutoSegmentCount(rounding), 1, IM_DRAWLIST_ARCFAST_TABLE_SIZE / 4);
|
const int arc_step = ImClamp(IM_DRAWLIST_ARCFAST_SAMPLE_MAX / this->_CalcCircleAutoSegmentCount(rounding), 1, IM_DRAWLIST_ARCFAST_TABLE_SIZE / 4);
|
||||||
const int arc_point_count = (IM_DRAWLIST_ARCFAST_TABLE_SIZE / 4) / arc_step + 1;
|
const int arc_point_count = (IM_DRAWLIST_ARCFAST_TABLE_SIZE / 4) / arc_step + 1;
|
||||||
|
|
||||||
int vtx_count = (4 + arc_point_count) * 3 + 3;
|
int vtx_count = (2 + arc_point_count) * 4 + 3;
|
||||||
int idx_count = (4 + arc_point_count - 1) * 4 * 3;
|
int idx_count = (4 + arc_point_count - 1) * 4 * 3;
|
||||||
|
|
||||||
PrimReserve(idx_count, vtx_count);
|
PrimReserve(idx_count, vtx_count);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user