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

[rshapes] DrawRectangleRoundedLines() results not aligned with DrawRectangleRounded() #4601

Open
Kaehvaman opened this issue Dec 14, 2024 · 3 comments

Comments

@Kaehvaman
Copy link

  • [*] I tested it on latest raylib version from master branch
  • [*] I checked there is no similar issue already reported
  • [*] I checked the documentation on the wiki
  • [*] My code has no errors or misuse of raylib

Issue description

DrawRectangleRoundedLines draws weird unequal corners and is taller and wider than DrawRectangleRounded, which draws identical corners.
DrawRectangleRoundedLinesEx with lineThick != 1 works as expected, so the issue is linked to lineThick of 1 pixel.

Environment

Windows 10
Visual Studio 2022
MSVC
C language
raylib.lib from v5.5 release
INFO: GL: OpenGL device information:
INFO: > Renderer: AMD Radeon RX 6750 XT
INFO: > Version: 3.3.0 Core Profile Context 24.10.1.241007
INFO: > GLSL: 4.60

Issue Screenshot

Screenshot_2

Code Example

Rectangle roundRect = { 100, 250, 185, 36 };
DrawRectangleRounded(roundRect, 0.5f, 6, BLACK);
DrawRectangleRoundedLines(roundRect, 0.5f, 6, ORANGE);

@raysan5 raysan5 changed the title [rshapes] DrawRectangleRoundedLines produces weird results [rshapes] DrawRectangleRoundedLines() results not aligned with DrawRectangleRounded() Dec 23, 2024
@raysan5
Copy link
Owner

raysan5 commented Dec 23, 2024

I think the issue is related to an off-by-one-pixel on lines calculations and I'm afraid that's a GPU-driver dependant issue, very difficult to address. Related to this, we have DrawRectangleLines() that still fails after many many changes and tries to solve the off-by-one-pixel issue...

@Kaehvaman
Copy link
Author

Wow, never expected a driver to break such a simple thing

@Kaehvaman
Copy link
Author

Updating to 24.12.1 driver didn't fix the issue :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants