Nuklear icon indicating copy to clipboard operation
Nuklear copied to clipboard

Incorrect stroke when AntiAliasing is OFF

Open ryuukk opened this issue 1 year ago • 6 comments

Happens on all backends

  • on the button: notice the left part of the stroke is not drawn
  • on the window: notice the 1px stroke on the left, and 2px stroke on the top

image

Someone kept merging PRs without testing AA setting, no bueno

ryuukk avatar Sep 24 '24 11:09 ryuukk

I've seen this too, and I'm not entirely sure where it popped up.

RobLoach avatar Sep 24 '24 22:09 RobLoach

Confirmed...

diff --git a/demo/glfw_opengl3/main.c b/demo/glfw_opengl3/main.c
index 0b6431a..9e30679 100644
--- a/demo/glfw_opengl3/main.c
+++ b/demo/glfw_opengl3/main.c
@@ -192,7 +192,7 @@ int main(void)
          * defaults everything back into a default state.
          * Make sure to either a.) save and restore or b.) reset your own state after
          * rendering the UI. */
-        nk_glfw3_render(&glfw, NK_ANTI_ALIASING_ON, MAX_VERTEX_BUFFER, MAX_ELEMENT_BUFFER);
+        nk_glfw3_render(&glfw, NK_ANTI_ALIASING_OFF, MAX_VERTEX_BUFFER, MAX_ELEMENT_BUFFER);
         glfwSwapBuffers(win);
     }
     nk_glfw3_shutdown(&glfw);

Screenshot from 2024-09-24 23-04-44

RobLoach avatar Sep 25 '24 03:09 RobLoach

I've gone all the back to April, 2020 at https://github.com/Immediate-Mode-UI/Nuklear/commit/b939d43ed6048cc05cd5d71e99afcdc71a56aea0 , and still can't find when this was actually working :thinking:

RobLoach avatar Sep 25 '24 03:09 RobLoach

off topic and sorry, but what VS theme r u using?

pumpkinbunny avatar Sep 28 '24 13:09 pumpkinbunny