-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Enabling vertical outer borders on tables produces an off-by-one pixel error for inner vertical borders #3752
Comments
I have looked at lines produced in the draw lists for the vertical table borders, and they end on half-pixels. Is this intended? At any rate, it looks like something this low-priority and not reproducible with examples is unlikely to get much attention. That being said, I can't build the OpenGL example on win32 right now, so maybe that should be checked first? |
Hello, I investigated this and your fix @v-ein seems right, pushed it as a340718. Thank you! Apologies I didn't investigate this and #3752 earlier: some of the border code in tables is subtly tricky because it closely relates to cliprect matching and ImDrawCmd merging constraints. However making this specific changes passes my regression tests in ImGuiTestSuite and didn't alter ImDrawCmd count. While investigating this I also spotted another long-time bug there in some situations the top-most outer border would be drawn twice, once with TableBorderLight (incorrectly), once with TableBorderStrong (correctly). The earlier would show underneath when TableBorderStrong has alpha under 1.0f. This is fixed with 5a483c2. |
FYI the fix for that caused a bigger issue #7428 |
Version/Branch of Dear ImGui:
Version: 1.80
Branch: docking
Back-ends: imgui_impl_win32.cpp + custom OpenGL renderer
Operating System: Windows
Config dump:
My Issue/Question:
When using the Tables API, I have noticed that the BordersOuterV flag causes on off-by-one pixel rendering error on the inner vertical borders. I can reproduce this in my own app by stripping it down to just the demo window with no custom fonts or anything, but I can't reproduce it with the examples, so I am assuming it's an issue with my renderer? I figure the scissor logic could be wrong, and I did fix something after re-reading it, but the issue remains. If it's related to clipping, I don't see similar issues anywhere else.
Note that the vertical line seems to be staying the same size when toggling the BordersOuterV flag. The bottom horizontal border actually comes up by one pixel.
With BordersOuterV
Without BordersOuterV
Off By One
The IMGUI OpenGL Rendering Code
The text was updated successfully, but these errors were encountered: