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

DrawRectangleRoundedLines implemented incorrectly? #435

Open
Hultan opened this issue Oct 21, 2024 · 6 comments
Open

DrawRectangleRoundedLines implemented incorrectly? #435

Hultan opened this issue Oct 21, 2024 · 6 comments

Comments

@Hultan
Copy link
Contributor

Hultan commented Oct 21, 2024

It looks like DrawRectangleRoundedLines is implemented incorrectly, in Raylib there are two functions called

    DrawRectangleRoundedLines 
    DrawRectangleRoundedLinesEx

where DrawRectangleRoundedLinesEx takes thickness as an extra argument, while DrawRectangleRoundedLines assumes thickness 1.0.

In raylib-go, only DrawRectangleRoundedLines exists, and it accepts the ´thickness` but it is ignored.

This makes it hard to complete the draw_rectangle_rounded example.

@JupiterRider
Copy link
Contributor

JupiterRider commented Oct 23, 2024

raylib-go purego version works with raylib 5.0 and raylib-go cgo version works with raylib v5.1-dev.

The change came with this commit: raysan5/raylib@b51f4db

If I add these functions to the cgo version, the signature of the functions would differ and if I add them to the purego version, the user would need to compile a raylib v5.1-dev raylib.dll.

I would prefer to wait for the next stable release, before solving this issue.

@gen2brain
Copy link
Owner

@JupiterRider Perhaps we can think about embedding the DLL in binary. The size of the gzipped library is about 700K, so on runtime, it can unpack it somewhere in /tmp and use the full path to the library. What do you think? However, it would make more sense if other platforms could also work, and it could be behind some build tag.

@JupiterRider
Copy link
Contributor

@gen2brain Do you mean to gzip compress the .dll/.so file and put it base64 encoded into the source code?

@gen2brain
Copy link
Owner

Yes, well no need for base64, just gzip and embed.

@Caue-Aron
Copy link

So we'll get this correct eventually? Rn im working on a UI project similar to WxWidgets but with go and raylib, the incorrect rounded rect lines is really noticeable as of now.

@JupiterRider
Copy link
Contributor

JupiterRider commented Nov 5, 2024

Yes, well no need for base64, just gzip and embed.

@gen2brain I started a discussion for this to not pollute this issue: #453
But yes, it is possible. We would only need our own build pipeline for the libraries.

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

4 participants