Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken line AA #2989

Closed
MrDimarik opened this issue Jan 17, 2020 · 1 comment
Closed

Broken line AA #2989

MrDimarik opened this issue Jan 17, 2020 · 1 comment

Comments

@MrDimarik
Copy link

Version/Branch of Dear ImGui:
Version: v1.75 WIP
Branch: master

Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_dx11.cpp + imgui_impl_win32.cpp
Compiler: Visual Studio 2019 (v142) (SDK: Last 10.0.18362.0)
Operating System: Windows 10 1909 (18363.592)

My Issue/Question:
Drawing a triangle looks choppy!
Is there any way to fix this?

Screenshots/Video
image

Code Sample
auto DrawList = ImGui::GetOverlayDrawList();
DrawList->AddTriangle({ 0,1080 }, { 960, 0 }, { 1000, 1000 }, -1, 2);

@ocornut
Copy link
Owner

ocornut commented Jan 20, 2020

Hello,

There's a bug where the thickness of polyline strokes is not consistent accross segments.
See #2183 and proposed solution #2964.

Workarounds

ImDrawList* draw_list = ImGui::GetOverlayDrawList();
draw_list->AddTriangle(ImVec2( 0,1080), ImVec2(960, 0), ImVec2(1000, 1000), IM_COL32(255,255,255,255), 3);

Closing as duplicate of issues marked above, we should tackle them fairly shortly as the PR linked above is quite functional.

@ocornut ocornut closed this as completed Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants