-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Alpha blending doesn't work on Windows #471
Comments
Hi @Linus4, have you tried setting the texture's blend mode via If that doesn't work, could you provide a minimal but complete application code that I can just build? Thanks! |
Hi @veeableful , I tried out setting the texture's blend mode, but it did not change anything. Here's a small test-application: main.go
This is using |
Ah I think I might have found the problem. It seems that the included SDL_ttf static library in the repository is on version 2.0.14 which apparently doesn't support alpha component of text color (according to the release note of 2.0.15 here). I'll see if I can update it. |
Hi @Linus4, sorry for the wait! I've been struggling to develop an automated way to update all the static libraries as it was created by another contributor with very different OS setup from mine. As a workaround, I have managed to build static library version of SDL2_ttf for Windows amd64. You can replace the Let me know if it works! I will continue to attempt to automate the builds of static libraries. |
Hi @veeableful , thanks for your help! I'm getting a few errors when I try to build the test application with your version of
|
I run Fedora and they provide a package |
Hi @Linus4, thanks for working it out and providing me the solution! Did you copy just If this method works, I'll update the libraries with the libraries from the Fedora packages at least for the Windows ones and bump up the version so you can use it immediately. |
Hi @veeableful , this is what I did: I'm not 100% sure the file
That would be fantastic! If it works, that is :P |
Hi @Linus4, I couldn't find the file Since I couldn't make it work with the Fedora package, I tried another way which is to download from MSys. It worked for me but I'm afraid that it might not work for you. Could you try copying the library there into Many thanks in advance! |
Hi @veeableful , now that you say it, I probably did compile and install SDL2_ttf myself, but I forgot because this was more than a year ago. :P |
Hi @Linus4, thanks for trying the MSys packages out! I have updated the Windows SDL2_ttf libraries but decided not to increment the version since we can just use the commit (e.g. |
Hi @veeableful , I've tried it with the command you posted and everything worked perfectly! Using the commit as the version is fine. Better don't rush anything ;) Thank you! 🥳 |
Yay, I'm glad that it works! And you're welcome 😃 |
Description
Rendering a string using the
RendererUTF8Blended
function from the ttf package ignores the alpha value specified in thesdl.Color
after cross-compiling from Linux to Windows. It does, however, work on Linux.Code example
Library version
v0.4.4
The text was updated successfully, but these errors were encountered: