Apologies if this has been addressed before but I didn't find anything from a quick Google search.
I have the following code:
auto dl = ImGui::GetForegroundDrawList();
vec2 offset = {10, 10};
dl->AddRectFilled(offset, offset + vec2(100, 100), 0xFFFFFFFF);
dl->AddRectFilled(offset + vec2(0, 100), offset + vec2(100, 200), 0xFF000000);
dl->AddLine(offset + vec2(50, 0), offset + vec2(50, 100), 0xFF0000FF);
The line is being drawn 1 pixel lower than it should be, on the start and end points. Here's what it looks like:

I'm probably just doing something stupid here but, I really don't understand why this happens!
Apologies if this has been addressed before but I didn't find anything from a quick Google search.
I have the following code:
The line is being drawn 1 pixel lower than it should be, on the start and end points. Here's what it looks like:

I'm probably just doing something stupid here but, I really don't understand why this happens!